X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-push.c;h=b68c6813b8c71e0e00790eb422e57f8e219095fb;hb=660b9c3a4e24ce9a2628f2ec88902e2384d1aade;hp=c8cb63e23840915ecd7445d1fe4a18f9c6cb694d;hpb=ab7d70766963e1e854a1edcbb0b840242330a7cb;p=git.git diff --git a/builtin-push.c b/builtin-push.c index c8cb63e23..b68c6813b 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -44,15 +44,6 @@ static void set_refspecs(const char **refs, int nr) strcat(tag, refs[i]); ref = tag; } - if (!strcmp("HEAD", ref)) { - unsigned char sha1_dummy[20]; - ref = resolve_ref(ref, sha1_dummy, 1, NULL); - if (!ref) - die("HEAD cannot be resolved."); - if (prefixcmp(ref, "refs/heads/")) - die("HEAD cannot be resolved to branch."); - ref = xstrdup(ref + 11); - } add_refspec(ref); } } @@ -90,7 +81,7 @@ static int do_push(const char *repo, int flags) if (!err) continue; - error("failed to push to '%s'", remote->url[i]); + error("failed to push some refs to '%s'", remote->url[i]); errs++; } return !!errs;