fetch: change flag code for displaying tag update and deleted ref
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>
Nguyễn Thái Ngọc Duy committed
Jun 26, 2016 at 07:58 UTC
2cb040baa6fcb8a6314a54933cbcb4d3fcb60401
2 files changed
+4
-4
Documentation/git-fetch.txt
+2
-2
@@ -120,8 +120,8 @@ flag::
120
A single character indicating the status of the ref:
121
(space);; for a successfully fetched fast-forward;
122
`+`;; for a successful forced update;
123
-`x`;; for a successfully pruned ref;
124
-`-`;; for a successful tag update;
123
+`-`;; for a successfully pruned ref;
124
+`t`;; for a successful tag update;
125
`*`;; for a successfully fetched new ref;
126
`!`;; for a ref that was rejected or failed to update; and
127
`=`;; for a ref that was up to date and did not need fetching.
builtin/fetch.c
+2
-2
@@ -500,7 +500,7 @@ static int update_local_ref(struct ref *ref,
500
starts_with(ref->name, "refs/tags/")) {
501
int r;
502
r = s_update_ref("updating tag", ref, 0);
503
- format_display(display, r ? '!' : '-', _("[tag update]"),
503
+ format_display(display, r ? '!' : 't', _("[tag update]"),
504
r ? _("unable to update local ref") : NULL,
505
remote, pretty_ref);
506
return r;
@@ -814,7 +814,7 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map,
814
fprintf(stderr, _("From %.*s\n"), url_len, url);
815
shown_url = 1;
816
}
817
- format_display(&sb, 'x', _("[deleted]"), NULL,
817
+ format_display(&sb, '-', _("[deleted]"), NULL,
818
_("(none)"), prettify_refname(ref->name));
819
fprintf(stderr, " %s\n",sb.buf);
820
strbuf_release(&sb);