summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-10-11 00:47:55 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-16 05:24:18 (GMT)
commitda0204df587ae76cd291bc7e495fc60d873c2f20 (patch)
tree055c4c2ee5fcbbe3887ef4d9383d8b34bfa90104 /t/t5510-fetch.sh
parentfe5d1d3eb42e6cf3dca93b2277be9464b026fcf2 (diff)
downloadgit-da0204df587ae76cd291bc7e495fc60d873c2f20.zip
git-da0204df587ae76cd291bc7e495fc60d873c2f20.tar.gz
git-da0204df587ae76cd291bc7e495fc60d873c2f20.tar.bz2
fetch: if not fetching from default remote, ignore default merge
When doing "git fetch <remote>" on a remote that does not have the branch referenced in branch.<current-branch>.merge, git fetch failed. It failed because it tried to add the "merge" ref to the refs to be fetched. Fix that. And add a test case. Incidentally, this unconvered a bug in our own test suite, where "git pull <some-path>" was expected to merge the ref given in the defaults, even if not pulling from the default remote. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 40ebf2e..d217657 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -200,4 +200,12 @@ test_expect_success 'push via rsync' '
'
}
+test_expect_success 'fetch with a non-applying branch.<name>.merge' '
+ git config branch.master.remote yeti &&
+ git config branch.master.merge refs/heads/bigfoot &&
+ git config remote.blub.url one &&
+ git config remote.blub.fetch "refs/heads/*:refs/remotes/one/*" &&
+ git fetch blub
+'
+
test_done