{"thread":{"id":"30934","subject":"corner case with rename tracking and reverts","startedAt":"2012-07-02T12:47:54Z","lastAt":"2012-07-02T21:07:33Z","messageCount":2,"participants":["Torben Hohn","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"194467","messageId":"20120702124754.GA25882@localhost.localdomain","threadId":"30934","inReplyTo":null,"subject":"corner case with rename tracking and reverts","fromName":"Torben Hohn","fromEmail":"torbenh@linutronix.de","sentAt":"2012-07-02T12:47:54Z","receivedAt":"2012-07-02T12:47:54Z","isPatch":false,"sender":{"key":"torbenh@linutronix.de","avatar":null},"body":"\nHi...\n\ni just came over some issue, where the rename tracking got confused.\n\nI wanted to revert a commit to a moved file. But because it touched an\nempty file, this seems to have confused the rename tracking.\n(there were a few empty files there)\n\nAttached is a shell script, that reproduces the issue.\n\nThe Problem is, that bla2 shows up in omg3, when \"bla2 empty\" is\nreverted.\n\nThis was produced with git 1.7.10 from debian.\n\n\n-- \nMit freundlichen Grüßen\nTorben Hohn\n\nLinutronix GmbH\n\nStandort: Bremen\n\nPhone: +49 421 166 73 41 ; Fax.: +49 7556 919 886\nmailto: torbenh@linutronix.de\nFirmensitz / Registered Office: D-88690 Uhldingen, Auf dem Berg 3\nRegistergericht / Local District Court: Freiburg i. Br., HRB Nr. / Trade\nregister no.: 700 806;\n\nGeschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner\n"},{"id":"194475","messageId":"20120702210733.GA5268@sigill.intra.peff.net","threadId":"30934","inReplyTo":"20120702124754.GA25882@localhost.localdomain","subject":"Re: corner case with rename tracking and reverts","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-07-02T21:07:33Z","receivedAt":"2012-07-02T21:07:33Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 02, 2012 at 02:47:54PM +0200, Torben Hohn wrote:\n\n> i just came over some issue, where the rename tracking got confused.\n> \n> I wanted to revert a commit to a moved file. But because it touched an\n> empty file, this seems to have confused the rename tracking.\n> (there were a few empty files there)\n\nYeah, it happens. When there are multiple identical sources (which\nhappens often with empty files), we try to disambiguate using some\nheuristics on the filename, but they are not always correct.\n\nAs of v1.7.11, git will explicitly avoid auto-merging across renames of\nempty files. Instead, you'll get a modify/delete conflict and be given\nthe opportunity to sort it out yourself.\n\n-Peff\n"}]}