Merge branch 'aw/mirror-push' into jk/send-pack
[git/git.git] / builtin-send-pack.c
index d42164e..418925e 100644 (file)
@@ -410,7 +410,8 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest
 
        if (!args.dry_run && remote && ret == 0) {
                for (ref = remote_refs; ref; ref = ref->next)
-                       update_tracking_ref(remote, ref);
+                       if (!is_null_sha1(ref->new_sha1))
+                               update_tracking_ref(remote, ref);
        }
 
        if (!new_refs && ret == 0)