{"id":22711,"date":"2018-09-10T17:05:08","date_gmt":"2018-09-10T21:05:08","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=22711"},"modified":"2018-09-14T15:06:37","modified_gmt":"2018-09-14T19:06:37","slug":"git-log-follow-enthusiastically-tracks-empty-files","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/09\/10\/git-log-follow-enthusiastically-tracks-empty-files\/","title":{"rendered":"&ldquo;git log --follow&rdquo; Enthusiastically Tracks Empty Files"},"content":{"rendered":"<p><a href=\"https:\/\/blog.plover.com\/prog\/git-log-follow.html\">Mark Dominus<\/a>:<\/p>\n<blockquote cite=\"https:\/\/blog.plover.com\/prog\/git-log-follow.html\">\n<p>This bug I just found in <code>git log --follow<\/code> is impressively massive. Until I worked out what was going on I was really perplexed, and even considered that my repository might have become corrupted.<\/p>\n<p>[&#8230;]<\/p>\n<p>It appears that Git, having detected that <code>book\/Watchmen.blog<\/code> was\nmoved to <code>movie\/Watchmen.blog<\/code> in Febraury 2012, is now following\n<code>book\/Watchmen.blog<\/code> backward in time.  It sees that in January 2012\nthe file was modified, and was formerly empty, and after that it sees\nthat in June 2009 the empty file was created.  At that time there was\nanother empty file, <code>wikipedia\/mega.notyet<\/code>.  And <code>git-log<\/code> decides that the\nempty file <code>book\/Watchmen.blog<\/code> was <em>copied<\/em> from the other empty\nfile.<\/p>\n\n<p>At this point it has gone completely off the rails, because it is now\nfollowing the unrelated empty file <code>wikipedia\/mega.notyet<\/code>.  It then\nmakes more mistakes of the same type.<\/p>\n<\/blockquote>\n\n<p id=\"git-log-follow-enthusiastically-tracks-empty-files-update-2018-09-14\">Update (2018-09-14): <a href=\"https:\/\/blog.plover.com\/prog\/git-log-follow-2.html\">Mark Dominus<\/a>:<\/p>\n<blockquote cite=\"https:\/\/blog.plover.com\/prog\/git-log-follow-2.html\">\n<p>The roadblock is: how does <code>--rename-empty<\/code> fit together with my\nproposed <code>--rename-size-threshhold<\/code> flag?  Should they be the same\nthing?  Or should they be separate options?  There appear to be at\nleast three subsystems in Git that try to decide if two similar or\nidentical files (which might have different names, or the same name in\ndifferent directories) are &ldquo;the same file&rdquo; for various purposes.  Do\nwe want to control the behavior of these subsystems separately or in\nunison?<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Mark Dominus: This bug I just found in git log --follow is impressively massive. Until I worked out what was going on I was really perplexed, and even considered that my repository might have become corrupted. [&#8230;] It appears that Git, having detected that book\/Watchmen.blog was moved to movie\/Watchmen.blog in Febraury 2012, is now following [&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":"2018-09-10T21:05:10Z","apple_news_api_id":"b1a607a0-193a-46ab-a852-7fff9d4f4bd1","apple_news_api_modified_at":"2018-09-14T19:06:41Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AsaYHoBk6RquoUn__nU9L0Q","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":[],"tags":[131,377],"class_list":["post-22711","post","type-post","status-publish","format-standard","hentry","tag-bug","tag-git"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22711","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=22711"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22711\/revisions"}],"predecessor-version":[{"id":22768,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22711\/revisions\/22768"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=22711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=22711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=22711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}