- fprintf(stderr, "updating '%s'", ref->name);
- if (strcmp(ref->name, ref->peer_ref->name))
- fprintf(stderr, " using '%s'",
- ref->peer_ref->name);
- fprintf(stderr, "\n from %s\n to %s\n",
- old_hex, new_hex);
+ char quickref[83];
+ char type = ' ';
+ const char *msg = "";
+
+ strcpy(quickref, find_unique_abbrev(ref->old_sha1, DEFAULT_ABBREV));
+ if (ref_newer(ref->peer_ref->new_sha1, ref->old_sha1))
+ strcat(quickref, "..");
+ else {
+ strcat(quickref, "...");
+ type = '+';
+ msg = " (forced update)";
+ }
+ strcat(quickref, find_unique_abbrev(ref->new_sha1, DEFAULT_ABBREV));
+
+ fprintf(stderr, " %c %-*s %s -> %s%s\n",
+ type,
+ SUMMARY_WIDTH, quickref,
+ pretty_peer, pretty_ref,
+ msg);