summaryrefslogtreecommitdiff
path: root/t/lib-pager.sh
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-09-20 23:55:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-21 04:12:52 (GMT)
commitb3e8ca89cfe34712a093c37fdbac7df7eaae91e7 (patch)
treeef77300c2853291f1825327c7546748563f694d1 /t/lib-pager.sh
parent3b827444811d7eddeddd44850f5dbbb4d59747f5 (diff)
downloadgit-b3e8ca89cfe34712a093c37fdbac7df7eaae91e7.zip
git-b3e8ca89cfe34712a093c37fdbac7df7eaae91e7.tar.gz
git-b3e8ca89cfe34712a093c37fdbac7df7eaae91e7.tar.bz2
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 't/lib-pager.sh')
0 files changed, 0 insertions, 0 deletions