{"id":3602,"date":"2011-07-18T20:30:54","date_gmt":"2011-07-19T01:30:54","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=3602"},"modified":"2011-07-19T20:46:19","modified_gmt":"2011-07-20T01:46:19","slug":"git-commit-generation-numbers","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2011\/07\/18\/git-commit-generation-numbers\/","title":{"rendered":"Git Commit Generation Numbers"},"content":{"rendered":"<p>There&rsquo;s an <a href=\"http:\/\/www.spinics.net\/lists\/git\/threads.html#161308\">interesting discussion<\/a> of Linus Torvalds&rsquo; <a href=\"http:\/\/www.spinics.net\/lists\/git\/msg161308.html\">proposed<\/a> <a href=\"http:\/\/www.spinics.net\/lists\/git\/msg161311.html\">patch<\/a> to change Git&rsquo;s commit object format (via <a href=\"http:\/\/news.ycombinator.com\/item?id=2765844\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"http:\/\/www.spinics.net\/lists\/git\/msg161308.html\"><p>And I have to say, with six years of git use, I think it&rsquo;s not a coincidence that the notion of generation numbers has come up several times over the years: I think the lack of them is literally the only real design mistake we have.<\/p><\/blockquote>\n<blockquote cite=\"http:\/\/www.spinics.net\/lists\/git\/msg161313.html\"><p>Now, if <em>may<\/em> turn out that we&rsquo;d want to have some cache for\ngeneration numbers in commits that don&rsquo;t have them, but I absolutely\nthink that that should be a &ldquo;add-on&rdquo; rather than anything fundamental.\nFor example, if we just merge the &ldquo;add generation numbers to the\ncommit object&rdquo; logic first, then the &ldquo;cache&rdquo; case never really needs\nto care about us generating new commits. They simply won&rsquo;t need the\ncache.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>There&rsquo;s an interesting discussion of Linus Torvalds&rsquo; proposed patch to change Git&rsquo;s commit object format (via Hacker News): And I have to say, with six years of git use, I think it&rsquo;s not a coincidence that the notion of generation numbers has come up several times over the years: I think the lack of them [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3602","post","type-post","status-publish","format-standard","hentry","category-programming-category"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=3602"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3602\/revisions"}],"predecessor-version":[{"id":3609,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3602\/revisions\/3609"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=3602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=3602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=3602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}