Skip to content

Commit d8b3a2b

Browse files
spearcegitster
authored andcommitted
Don't attempt to merge non-existant remotes in t5515
This was actually reverted in 756373d by Junio. We no longer support merging the right hand side of a fetchspec in a branch's branch.$name.merge configuration setting as we interpret these names as being only those published by the remote we are going to fetch from. The older shell based implementation of git-fetch did not report an error when branch.$name.merge was referencing a branch that does not exist on the remote and we are running `git fetch` for the current branch. The new builtin-fetch does notice this failure and aborts the fetch, thus breaking the tests. Junio and I kicked it around on #git earlier today and decided that the best approach here is to error out and tell the user that their configuration is wrong, as this is likely more user friendly than silently ignoring the user's request. Since the new builtin-fetch is already issuing the error there is no code change required, we just need to remove the bad configuration from our test. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 27e1337 commit d8b3a2b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

t/t5515-fetch-merge-logic.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ test_expect_success setup '
8484
git config branch.br-$remote-merge.merge refs/heads/three &&
8585
git config branch.br-$remote-octopus.remote $remote &&
8686
git config branch.br-$remote-octopus.merge refs/heads/one &&
87-
git config --add branch.br-$remote-octopus.merge two &&
88-
git config --add branch.br-$remote-octopus.merge remotes/rem/three
87+
git config --add branch.br-$remote-octopus.merge two
8988
done
9089
'
9190

0 commit comments

Comments
 (0)