git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* corner case with rename tracking and reverts
@ 2012-07-02 12:47 Torben Hohn
  2012-07-02 21:07 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Torben Hohn @ 2012-07-02 12:47 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]


Hi...

i just came over some issue, where the rename tracking got confused.

I wanted to revert a commit to a moved file. But because it touched an
empty file, this seems to have confused the rename tracking.
(there were a few empty files there)

Attached is a shell script, that reproduces the issue.

The Problem is, that bla2 shows up in omg3, when "bla2 empty" is
reverted.

This was produced with git 1.7.10 from debian.


-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 421 166 73 41 ; Fax.: +49 7556 919 886
mailto: torbenh@linutronix.de
Firmensitz / Registered Office: D-88690 Uhldingen, Auf dem Berg 3
Registergericht / Local District Court: Freiburg i. Br., HRB Nr. / Trade
register no.: 700 806;

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

[-- Attachment #2: revert-mv.sh --]
[-- Type: application/x-sh, Size: 685 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: corner case with rename tracking and reverts
  2012-07-02 12:47 corner case with rename tracking and reverts Torben Hohn
@ 2012-07-02 21:07 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2012-07-02 21:07 UTC (permalink / raw)
  To: Torben Hohn; +Cc: git

On Mon, Jul 02, 2012 at 02:47:54PM +0200, Torben Hohn wrote:

> i just came over some issue, where the rename tracking got confused.
> 
> I wanted to revert a commit to a moved file. But because it touched an
> empty file, this seems to have confused the rename tracking.
> (there were a few empty files there)

Yeah, it happens. When there are multiple identical sources (which
happens often with empty files), we try to disambiguate using some
heuristics on the filename, but they are not always correct.

As of v1.7.11, git will explicitly avoid auto-merging across renames of
empty files. Instead, you'll get a modify/delete conflict and be given
the opportunity to sort it out yourself.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-02 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 12:47 corner case with rename tracking and reverts Torben Hohn
2012-07-02 21:07 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).