最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Is there any guarantee that a Git commit object will have its fields stored in the treeparentsauthorcomittergpgsig order? - Stac

programmeradmin83浏览0评论

A commit object usually looks something like this:

tree aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
parent aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
author Somebody <[email protected]> 1741933308 +0000
committer Somebody <[email protected]> 1741933308 +0000
gpgsig -----BEGIN SSH SIGNATURE-----
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAA=
 -----END SSH SIGNATURE-----

Title

Message message message message
message message message message

Is there any guarantee that the fields will be in this

  • tree
  • parent(s)
  • author
  • comitter
  • gpgsig

order?


Apparently Git itself rejects commits where I reorder some fields (it doesn't let them pass fsck). However, is there any guarantee anywhere that this behavior will be kept?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论