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: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NLars Hjemli <hjemli@gmail.com> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
Showing
想要评论请 注册 或 登录