mirror of
https://github.com/git/git.git
synced 2024-11-16 14:04:52 +01:00
124b70a2ad
If the bottom of a mergeinfo range is a commit that maps to a git root commit, then it doesn't have a parent. In such a case, use git commit range "$top_commit" rather than "$bottom_commit^..$top_commit". [ew: line-wrap at 80 columns] Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
33 lines
1.1 KiB
Bash
Executable file
33 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
test_description='git svn handling of root commits in merge ranges'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'test handling of root commits in merge ranges' '
|
|
mkdir -p init/trunk init/branches init/tags &&
|
|
echo "r1" > init/trunk/file.txt &&
|
|
svn_cmd import -m "initial import" init "$svnrepo" &&
|
|
svn_cmd co "$svnrepo" tmp &&
|
|
(
|
|
cd tmp &&
|
|
echo "r2" > trunk/file.txt &&
|
|
svn_cmd commit -m "Modify file.txt on trunk" &&
|
|
svn_cmd cp trunk@1 branches/a &&
|
|
svn_cmd commit -m "Create branch a from trunk r1" &&
|
|
svn_cmd propset svn:mergeinfo /trunk:1-2 branches/a &&
|
|
svn_cmd commit -m "Fake merge of trunk r2 into branch a" &&
|
|
mkdir branches/b &&
|
|
echo "r5" > branches/b/file2.txt &&
|
|
svn_cmd add branches/b &&
|
|
svn_cmd commit -m "Create branch b from thin air" &&
|
|
echo "r6" > branches/b/file2.txt &&
|
|
svn_cmd commit -m "Modify file2.txt on branch b" &&
|
|
svn_cmd cp branches/b@5 branches/c &&
|
|
svn_cmd commit -m "Create branch c from branch b r5" &&
|
|
svn_cmd propset svn:mergeinfo /branches/b:5-6 branches/c &&
|
|
svn_cmd commit -m "Fake merge of branch b r6 into branch c"
|
|
) &&
|
|
git svn init -s "$svnrepo" &&
|
|
git svn fetch
|
|
'
|
|
|
|
test_done
|