Package: git
Version: 1:1.7.2.3-1
Severity: minor
Justification: cosmetic
Hi,
In an octopus merge, with conflicts in the last step, the conflict markers
look like this:
<<<<<<< .merge_file_2An9iT
... our side ...
||||||| .merge_file_5k594S
... ancestral version ...
=======
... their side ....
>>>>>>> .merge_file_uWPh0U
It would be better to use meaningful labels to describe the three
participants in the merge.
The relevant code is in git-merge-one-file.sh:
# Be careful for funny filename such as "-L" in "$4", which
# would confuse "merge" greatly.
src1=`git-unpack-file $2`
git merge-file "$src1" "$orig" "$src2"
ret=$?
msg=
if [ $ret -ne 0 ]; then
msg='content conflict'
fi
# Create the working tree file, using "our tree" version from the
# index, and then store the result of the merge.
git checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4"
rm -f -- "$orig" "$src1" "$src2"
Perhaps merge-one-file should get optional "label" arguments, making this
git merge-file -L "$9" -L "$8" -L "$10" "$src1" "$orig" "$src2"
Jonathan
$ git merge svnrdump/master svnrdump/tests
Trying simple merge with svnrdump/master
Simple merge did not work, trying automatic merge.
Auto-merging load_editor.c
Auto-merging svnrdump.c
Trying simple merge with svnrdump/tests
Simple merge did not work, trying automatic merge.
Auto-merging svnrdump_tests.py
Auto-merging svntest/main.py
ERROR: content conflict in svntest/main.py
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
$ sed -n "/^<<<</,/^>>>>/ p" svntest/main.py
<<<<<<< .merge_file_2An9iT
svn_binary = 'svn'
svnadmin_binary = 'svnadmin'
svnlook_binary = 'svnlook'
svnrdump_binary = os.path.abspath('./svnrdump' + _exe)
svnsync_binary = 'svnsync'
svnversion_binary = 'svnversion'
svndumpfilter_binary = 'svndumpfilter'
entriesdump_binary = 'entries-dump'
||||||| .merge_file_5k594S
svn_binary = os.path.abspath('../../svn/svn' + _exe)
svnadmin_binary = os.path.abspath('../../svnadmin/svnadmin' + _exe)
svnlook_binary = os.path.abspath('../../svnlook/svnlook' + _exe)
svnrdump_binary = os.path.abspath('../../svnrdump/svnrdump' + _exe)
svnsync_binary = os.path.abspath('../../svnsync/svnsync' + _exe)
svnversion_binary = os.path.abspath('../../svnversion/svnversion' + _exe)
svndumpfilter_binary = os.path.abspath('../../svndumpfilter/svndumpfilter' + \
_exe)
entriesdump_binary = os.path.abspath('entries-dump' + _exe)
=======
svn_binary = os.path.abspath('../../svn/svn' + _exe)
svnadmin_binary = os.path.abspath('../../svnadmin/svnadmin' + _exe)
svnlook_binary = os.path.abspath('../../svnlook/svnlook' + _exe)
svnrdump_binary = os.path.abspath('../../svnrdump/svnrdump' + _exe)
svnsync_binary = os.path.abspath('../../svnsync/svnsync' + _exe)
svnversion_binary = os.path.abspath('../../svnversion/svnversion' + _exe)
svndumpfilter_binary = os.path.abspath('../../svndumpfilter/svndumpfilter' + \
_exe)
entriesdump_binary = os.path.abspath('entries-dump' + _exe)
atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \
_exe)
>>>>>>> .merge_file_uWPh0U
$ echo hmph.
hmph.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]