Skip to content

Commit 6a2009e

Browse files
suutariEric Wong
authored andcommitted
git-svn: Fix discarding of extra parents from svn:mergeinfo
If parent J is an ancestor of parent I, then parent J should be discarded, not I. Note that J is an ancestor of I if and only if rev-list I..J is emtpy, which is what we are testing here. Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
1 parent 9560808 commit 6a2009e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3273,7 +3273,7 @@ sub find_extra_svn_parents {
32733273
"$new_parents[$i]..$new_parents[$j]",
32743274
);
32753275
if ( !$revs ) {
3276-
undef($new_parents[$i]);
3276+
undef($new_parents[$j]);
32773277
}
32783278
}
32793279
}

t/t9151-svn-mergeinfo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test_expect_success 'svn non-merge merge commits did not become git merge commit
3333
[ -z "$bad_non_merges" ]
3434
'
3535

36-
test_expect_failure 'commit made to merged branch is reachable from the merge' '
36+
test_expect_success 'commit made to merged branch is reachable from the merge' '
3737
before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2")
3838
merge_commit=$(git rev-list --all --grep="Merge trunk to b2")
3939
not_reachable=$(git rev-list -1 $before_commit --not $merge_commit)

0 commit comments

Comments
 (0)