X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=transport.c;h=b9306ef64543d4eb705354ac170d9acc7b735ec5;hb=7ed1690c343dc16dfd5a5493589cbf74d503c238;hp=9932f402dfee2605dbb498b120813aebaa3961f8;hpb=159a5a2fa2b5da57a5b69dafc816d30c3716604f;p=git.git diff --git a/transport.c b/transport.c index 9932f402d..b9306ef64 100644 --- a/transport.c +++ b/transport.c @@ -741,7 +741,7 @@ void transport_print_push_status(const char *dest, struct ref *refs, n += print_one_push_status(ref, dest, n, porcelain); if (ref->status == REF_STATUS_REJECT_NONFASTFORWARD && *nonfastforward != NON_FF_HEAD) { - if (!strcmp(head, ref->name)) + if (head != NULL && !strcmp(head, ref->name)) *nonfastforward = NON_FF_HEAD; else *nonfastforward = NON_FF_OTHER;