cmd_fetch_pack(): return early if finish_connect() fails
This simplifies the logic without changing the behavior. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
f537cfa750
commit
7418f1a037
|
@ -1018,10 +1018,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
|
||||||
close(fd[0]);
|
close(fd[0]);
|
||||||
close(fd[1]);
|
close(fd[1]);
|
||||||
if (finish_connect(conn))
|
if (finish_connect(conn))
|
||||||
ref = NULL;
|
return 1;
|
||||||
ret = !ref;
|
|
||||||
|
|
||||||
if (!ret && sought.nr) {
|
ret = !ref;
|
||||||
|
if (ref && sought.nr) {
|
||||||
/* If the heads to pull were given, we should have
|
/* If the heads to pull were given, we should have
|
||||||
* consumed all of them by matching the remote.
|
* consumed all of them by matching the remote.
|
||||||
* Otherwise, 'git fetch remote no-such-ref' would
|
* Otherwise, 'git fetch remote no-such-ref' would
|
||||||
|
|
Loading…
Reference in New Issue