fetch: change flag code for displaying tag update and deleted ref
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 26 Jun 2016 05:58:08 +0000 (07:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jun 2016 17:58:02 +0000 (10:58 -0700)
This makes the fetch flag code consistent with push, where '-' means
deleted ref.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-fetch.txt
builtin/fetch.c
index cbf441f671d1c0a6bc63c861cacdcd670678ed8e..771dde51cda36f756db471f10590831a20b89da1 100644 (file)
@@ -120,8 +120,8 @@ flag::
        A single character indicating the status of the ref:
 (space);; for a successfully fetched fast-forward;
 `+`;; for a successful forced update;
-`x`;; for a successfully pruned ref;
-`-`;; for a successful tag update;
+`-`;; for a successfully pruned ref;
+`t`;; for a successful tag update;
 `*`;; for a successfully fetched new ref;
 `!`;; for a ref that was rejected or failed to update; and
 `=`;; for a ref that was up to date and did not need fetching.
index a7f152a3158bab2e3303f4a1784f2d267e07a76c..8177f90d418f5b3d27ececad4e74fb529faff1de 100644 (file)
@@ -500,7 +500,7 @@ static int update_local_ref(struct ref *ref,
            starts_with(ref->name, "refs/tags/")) {
                int r;
                r = s_update_ref("updating tag", ref, 0);
-               format_display(display, r ? '!' : '-', _("[tag update]"),
+               format_display(display, r ? '!' : 't', _("[tag update]"),
                               r ? _("unable to update local ref") : NULL,
                               remote, pretty_ref);
                return r;
@@ -814,7 +814,7 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map,
                                fprintf(stderr, _("From %.*s\n"), url_len, url);
                                shown_url = 1;
                        }
-                       format_display(&sb, 'x', _("[deleted]"), NULL,
+                       format_display(&sb, '-', _("[deleted]"), NULL,
                                       _("(none)"), prettify_refname(ref->name));
                        fprintf(stderr, " %s\n",sb.buf);
                        strbuf_release(&sb);