Code

fetch: if not fetching from default remote, ignore default merge
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Thu, 11 Oct 2007 00:47:55 +0000 (01:47 +0100)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 16 Oct 2007 05:24:18 +0000 (01:24 -0400)
commitda0204df587ae76cd291bc7e495fc60d873c2f20
tree055c4c2ee5fcbbe3887ef4d9383d8b34bfa90104
parentfe5d1d3eb42e6cf3dca93b2277be9464b026fcf2
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>
builtin-fetch.c
t/t5510-fetch.sh
t/t5700-clone-reference.sh