aboutsummaryrefslogtreecommitdiff
path: root/builtin-send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-send-pack.c')
-rw-r--r--builtin-send-pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index c1fd3f5fb..5a0f5c681 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -365,8 +365,9 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest
char quickref[83];
char type = ' ';
const char *msg = "";
-
- strcpy(quickref, find_unique_abbrev(ref->old_sha1, DEFAULT_ABBREV));
+ const char *old_abb;
+ old_abb = find_unique_abbrev(ref->old_sha1, DEFAULT_ABBREV);
+ strcpy(quickref, old_abb ? old_abb : old_hex);
if (ref_newer(ref->peer_ref->new_sha1, ref->old_sha1))
strcat(quickref, "..");
else {