mirror of
https://github.com/git/git.git
synced 2024-11-01 23:07:55 +01:00
7a955a5365
The old function was incorrect; in some instances it marks a cherry picked range as a merged branch (because of an incorrect assumption that 'rev-list COMMIT --not RANGE' would work). This is replaced with a function which should detect them correctly, memoized to limit the expense of dealing with branches with many cherry picks to one 'merge-base' call per merge, per branch which used cherry picking. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
41 lines
1 KiB
Bash
Executable file
41 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2007, 2009 Sam Vilain
|
|
#
|
|
|
|
test_description='git-svn svn mergeinfo properties'
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'load svn dump' "
|
|
svnadmin load -q '$rawsvnrepo' \
|
|
< '$TEST_DIRECTORY/t9151/svn-mergeinfo.dump' &&
|
|
git svn init --minimize-url -R svnmerge \
|
|
-T trunk -b branches '$svnrepo' &&
|
|
git svn fetch --all
|
|
"
|
|
|
|
test_expect_success 'all svn merges became git merge commits' '
|
|
unmarked=$(git rev-list --parents --all --grep=Merge |
|
|
grep -v " .* " | cut -f1 -d" ")
|
|
[ -z "$unmarked" ]
|
|
'
|
|
|
|
test_expect_success 'cherry picks did not become git merge commits' '
|
|
bad_cherries=$(git rev-list --parents --all --grep=Cherry |
|
|
grep " .* " | cut -f1 -d" ")
|
|
[ -z "$bad_cherries" ]
|
|
'
|
|
|
|
test_expect_success 'svn non-merge merge commits did not become git merge commits' '
|
|
bad_non_merges=$(git rev-list --parents --all --grep=non-merge |
|
|
grep " .* " | cut -f1 -d" ")
|
|
[ -z "$bad_non_merges" ]
|
|
'
|
|
|
|
test_expect_success 'everything got merged in the end' '
|
|
unmerged=$(git rev-list --all --not master)
|
|
[ -z "$unmerged" ]
|
|
'
|
|
|
|
test_done
|