Files
git/builtin
Jonathan Tan b3e8ca89cf fast-export: do not copy from modified file
When run with the "-C" option, fast-export writes 'C' commands in its
output whenever the internal diff mechanism detects a file copy,
indicating that fast-import should copy the given existing file to the
given new filename. However, the diff mechanism works against the
prior version of the file, whereas fast-import uses whatever is current.
This causes issues when a commit both modifies a file and uses it as the
source for a copy.

Therefore, teach fast-export to refrain from writing 'C' when it has
already written a modification command for a file.

An existing test in t9350-fast-export is also fixed in this patch. The
existing line "C file6 file7" copies the wrong version of file6, but it
has coincidentally worked because file7 was subsequently overridden.

Reported-by: Juraj Oršulić <juraj.orsulic@fer.hr>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-21 13:12:52 +09:00
..
2016-11-22 13:55:20 -08:00
2016-09-22 13:42:18 -07:00
2016-09-29 15:42:18 -07:00
2016-09-21 15:15:24 -07:00
2016-10-10 14:03:50 -07:00
2016-09-26 16:09:17 -07:00
2016-11-22 13:13:16 -08:00
2016-10-26 13:30:51 -07:00
2016-09-29 15:42:18 -07:00
2016-10-11 14:18:32 -07:00
2016-09-29 15:42:18 -07:00
2016-09-29 15:42:18 -07:00
2016-09-29 20:40:23 -07:00
2016-10-03 12:46:47 -07:00
2016-11-28 13:18:51 -08:00