diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/push.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/push.c b/builtin/push.c index 6da3a8e5d3..da34524e6f 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, ':')) { |