Skip to content

Commit 983b17d

Browse files
jherlandgitster
authored andcommitted
t9114.2: Don't use --track option against "svn-remote"-tracking branches
We are formalizing a requirement that any remote-tracking branch to be used as an upstream (i.e. as an argument to --track), _must_ "belong" to a configured remote by being matched by the "dst" side of a fetch refspec. This test uses --track against a "remotes/trunk" ref which does not belong to any configured (git) remotes, but is instead created by "git svn fetch" operating on an svn-remote. It does not make sense to use an svn-remote as an upstream for a local branch, as a regular "git pull" from (or "git push" to) it would obviously fail (instead you would need to use "git svn" to communicate with this remote). Furthermore, the usage of --track in this case is unnecessary, since the upstreaming config that would be created is never used. Simply removing --track fixes the issue without changing the expected behavior of the test. Acked-by: Eric Wong <[email protected]> Signed-off-by: Johan Herland <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 88a9f72 commit 983b17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t9114-git-svn-dcommit-merge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test_expect_success 'setup svn repository' '
4848
test_expect_success 'setup git mirror and merge' '
4949
git svn init "$svnrepo" -t tags -T trunk -b branches &&
5050
git svn fetch &&
51-
git checkout --track -b svn remotes/trunk &&
51+
git checkout -b svn remotes/trunk &&
5252
git checkout -b merge &&
5353
echo new file > new_file &&
5454
git add new_file &&

0 commit comments

Comments
 (0)