{"thread":{"id":"18967","subject":"correct git merge behavior or corner case?","startedAt":"2009-04-20T14:50:25Z","lastAt":"2009-04-21T19:27:18Z","messageCount":2,"participants":["François Beausoleil","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"111744","messageId":"2FE32A75-C0D9-4156-B5D2-61AC6C086E5F@teksol.info","threadId":"18967","inReplyTo":null,"subject":"correct git merge behavior or corner case?","fromName":"François Beausoleil","fromEmail":"francois@teksol.info","sentAt":"2009-04-20T14:50:25Z","receivedAt":"2009-04-20T14:50:25Z","isPatch":false,"sender":{"key":"francois@teksol.info","avatar":null},"body":"Hi all,\n\nI'm the author of http://blog.teksol.info/2009/04/15/beware-of-gits-content-tracking.html\n\nIn http://article.gmane.org/gmane.comp.version-control.git/116954,  \nJohannes was very critical of me, so here's the full story.\n\nI cloned the repository and branched master to do some integration  \nwork.  On the integration branch, I created an empty file.  At one  \npoint, I merged from master and had some conflicts.  While resolving  \nthe conflicts, I happened to notice a file that didn't exist on master  \nhad been modified.\n\nFull transcript follows:\n\n$ git checkout -b merge-tracking-reproduce  \n5b8520419833635c61bdfb9abbbdc086df512388 # integration branch\n$ git merge 5ed60ecabd585972003084e07401f598d00f5a1d # master branch\n\n$ git status\n# On branch merge-tracking-reproduce\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n...\n#       modified:   vendor/plugins/acts_as_money/LICENSE\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#\n... a couple of conflicts, they don't matter\n\n$ git diff --cached vendor/plugins/acts_as_money/LICENSE\ndiff --git a/vendor/plugins/acts_as_money/LICENSE b/vendor/plugins/ \nacts_as_money/LICENSE\nindex e69de29..a273c73 100644\n--- a/vendor/plugins/acts_as_money/LICENSE\n+++ b/vendor/plugins/acts_as_money/LICENSE\n@@ -0,0 +1,4 @@\n+one:\n+  user: active\n+  name: name\n+  description: description\n\n$ git log 5b8520419833635c61bdfb9abbbdc086df512388 -- vendor/plugins/ \nacts_as_money/LICENSE # on integration branch\ncommit c25787637b6ac5d8f0783cf1688c9ce6fb135659\nAuthor: François Beausoleil <francois@teksol.info>\nDate:   Thu Apr 9 14:15:03 2009 -0400\n\n     Added Quirky dependencies\n\n$ git log 5ed60ecabd585972003084e07401f598d00f5a1d -- vendor/plugins/ \nacts_as_money/LICENSE # on master branch\n# empty, no file by that name on master\n\n$ git log \"-Sdescription: description\"  \n5b8520419833635c61bdfb9abbbdc086df512388 # on integration branch\n\n$ git log \"-Sdescription: description\"  \n5ed60ecabd585972003084e07401f598d00f5a1d # on master branch\ncommit 36d2a29d0c3c3a2a51db5f3be9faea7cea7ff3c1\nAuthor: Michael Lacy <mike@kluster.com>\nDate:   Tue Apr 14 10:16:50 2009 -0400\n\n     quirky voting\n\n$ git diff 36d2a29d0c3c3a2a51db5f3be9faea7cea7ff3c1^.. \n36d2a29d0c3c3a2a51db5f3be9faea7cea7ff3c1 -- vendor/gems/thoughtbot- \nshoulda-2.10.1/test/fixtures/products.yml\ndiff --git a/vendor/gems/thoughtbot-shoulda-2.10.1/test/fixtures/ \nproducts.yml b/vendor/gems/thoughtbot-shoulda-2.10.1/test/fixtures/\nindex e69de29..a273c73 100644\n--- a/vendor/gems/thoughtbot-shoulda-2.10.1/test/fixtures/products.yml\n+++ b/vendor/gems/thoughtbot-shoulda-2.10.1/test/fixtures/products.yml\n@@ -0,0 +1,4 @@\n+one:\n+  user: active\n+  name: name\n+  description: description\n\nRegarding Anders reproduction recipe, no file was deleted.  I'm trying  \nto write a reproduction script, but haven't managed to reproduce it  \njust yet.  The steps I *think* happened are thus:\n\ncd $(mktemp -d repo.XXXXXX)\ngit init\ntouch README\ngit add README\ngit commit --message \"First commit\"\ngit checkout -b integration\nmkdir -p vendor/a\ntouch vendor/a/LICENSE\ngit add vendor/a/LICENSE\ngit commit --message \"Adding LICENSE\"\ngit checkout master\nmkdir -p vendor/b\ntouch vendor/b/COPYING\ngit add vendor/b/COPYING\ngit commit --message \"Adding COPYING\"\necho \"adding some content\" > vendor/b/COPYING\ngit commit --all --message \"Updated COPYING\"\ngit checkout integration\ngit merge master\ngit diff HEAD^..HEAD\n\nBut the bug isn't reproduced with these steps.  If you want access to  \nthe repository, please contact me privately and I'll give you access.\n\nJohannes, you were right: I should have found the right avenue for  \nposting this question and done so.  If not immediately, at least the  \nnext day.  It was late, I had other things to do, I just decided to  \npost a quick note.  Call me lazy, yes.  Incompetent, that's going a  \nbit too far.  I hope my competence can be redeemed in your eyes.\n\nHave a nice day!\n--\nFrançois Beausoleil\nhttp://blog.teksol.info/\nhttp://piston.rubyforge.org/\n"},{"id":"111900","messageId":"20090421192718.GA7832@coredump.intra.peff.net","threadId":"18967","inReplyTo":"2FE32A75-C0D9-4156-B5D2-61AC6C086E5F@teksol.info","subject":"Re: correct git merge behavior or corner case?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-04-21T19:27:18Z","receivedAt":"2009-04-21T19:27:18Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 20, 2009 at 10:50:25AM -0400, François Beausoleil wrote:\n\n> Regarding Anders reproduction recipe, no file was deleted.  I'm trying to \n> write a reproduction script, but haven't managed to reproduce it just yet. \n>  The steps I *think* happened are thus:\n\nIf there is no deletion, then that seems like it might actually be a\nbug.\n\n> But the bug isn't reproduced with these steps.  If you want access to the \n> repository, please contact me privately and I'll give you access.\n\nI can take a look at it if you want to mail me the details off-list.\n\n> Johannes, you were right: I should have found the right avenue for  \n> posting this question and done so.  If not immediately, at least the next \n> day.  It was late, I had other things to do, I just decided to post a \n> quick note.  Call me lazy, yes.  Incompetent, that's going a bit too far.  \n> I hope my competence can be redeemed in your eyes.\n\nI think it is OK to complain about and discuss git on your blog. That's\nwhat it's there for. But I do think you are much more likely to get\ndeveloper attention and get your problem _fixed_ if you send a message\nto the mailing list. So I don't think posting on a blog makes you\nincompetent; but complaining afterwards that git developers didn't read\nyour blog and fix your problem might. ;)\n\n-Peff\n"}]}