From: Junio C Hamano Date: Tue, 6 May 2008 02:16:12 +0000 (-0700) Subject: Merge branch 'jk/fetch-status' X-Git-Tag: v1.5.6-rc0~94 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9c36e1700f99811ea9190279ea197424dcbb0303?ds=inline;hp=-c Merge branch 'jk/fetch-status' * jk/fetch-status: git-fetch: always show status of non-tracking-ref fetches --- 9c36e1700f99811ea9190279ea197424dcbb0303 diff --combined builtin-fetch.c index 167f948036,e4486e4286..e56617e32e --- a/builtin-fetch.c +++ b/builtin-fetch.c @@@ -360,12 -360,10 +360,10 @@@ static int store_updated_refs(const cha if (ref) update_local_ref(ref, what, verbose, note); - else if (verbose) + else sprintf(note, "* %-*s %-*s -> FETCH_HEAD", SUMMARY_WIDTH, *kind ? kind : "branch", REFCOL_WIDTH, *what ? what : "HEAD"); - else - *note = '\0'; if (*note) { if (!shown_url) { fprintf(stderr, "From %.*s\n", @@@ -577,6 -575,8 +575,6 @@@ static int do_fetch(struct transport *t free_refs(ref_map); } - transport_disconnect(transport); - return 0; } @@@ -597,7 -597,6 +595,7 @@@ int cmd_fetch(int argc, const char **ar int i; static const char **refs = NULL; int ref_nr = 0; + int exit_code; /* Record the command line for the reflog */ strbuf_addstr(&default_rla, "fetch"); @@@ -651,9 -650,6 +649,9 @@@ signal(SIGINT, unlock_pack_on_signal); atexit(unlock_pack); - return do_fetch(transport, + exit_code = do_fetch(transport, parse_fetch_refspec(ref_nr, refs), ref_nr); + transport_disconnect(transport); + transport = NULL; + return exit_code; }