summaryrefslogtreecommitdiff
path: root/builtin/check-attr.c
diff options
context:
space:
mode:
authorLibravatar Jonathan Tan <jonathantanmy@google.com>2017-09-20 16:55:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-21 13:12:52 +0900
commitb3e8ca89cfe34712a093c37fdbac7df7eaae91e7 (patch)
treeef77300c2853291f1825327c7546748563f694d1 /builtin/check-attr.c
parentGit 2.11.3 (diff)
downloadtgif-b3e8ca89cfe34712a093c37fdbac7df7eaae91e7.tar.xz
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>
Diffstat (limited to 'builtin/check-attr.c')
0 files changed, 0 insertions, 0 deletions