Merge branch 'jk/fetch-status'
authorJunio C Hamano <gitster@pobox.com>
Tue, 6 May 2008 02:16:12 +0000 (19:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 May 2008 02:16:12 +0000 (19:16 -0700)
* jk/fetch-status:
git-fetch: always show status of non-tracking-ref fetches

1  2 
builtin-fetch.c
diff --combined builtin-fetch.c
index 167f948036170fd2ec5a8e3bd3ca20359d8c9ee5,e4486e428625f781877749b86388f1e1795d0e03..e56617e32e5f878e1ae9f0d94ceced28ba18a94e
@@@ -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");
  
        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;
  }