]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/push.c
Merge branch 'jc/push-delete-nothing'
[thirdparty/git.git] / builtin / push.c
index 03adb58602971d8fa754da44d077fd36968b1636..194967ed79dc99fe37720ffff012bf40275ff29d 100644 (file)
@@ -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, ':')) {