X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=builtin%2Fpush.c;fp=builtin%2Fpush.c;h=194967ed79dc99fe37720ffff012bf40275ff29d;hp=03adb58602971d8fa754da44d077fd36968b1636;hb=140045821aa78da3a80a7d7c8f707b955e1ab40d;hpb=cadae717d557840d3566b7c0fc2003046e08c88f diff --git a/builtin/push.c b/builtin/push.c index 03adb58602..194967ed79 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -115,7 +115,7 @@ static void set_refspecs(const char **refs, int nr, const char *repo) else refspec_appendf(&rs, "refs/tags/%s", ref); } else if (deleterefs) { - if (strchr(ref, ':')) + if (strchr(ref, ':') || !*ref) die(_("--delete only accepts plain target ref names")); refspec_appendf(&rs, ":%s", ref); } else if (!strchr(ref, ':')) {