Merge branch 'jc/push-delete-nothing'
"git push $there --delete ''" should have been diagnosed as an error, but instead turned into a matching push, which has been corrected. * jc/push-delete-nothing: push: do not turn --delete '' into a matching push
This commit is contained in:
@ -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, ':')) {
|
||||
|
Reference in New Issue
Block a user