Merge branch 'ps/push-delete-option'
authorJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2016 23:16:53 +0000 (15:16 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2016 23:16:54 +0000 (15:16 -0800)
"branch --delete" has "branch -d" but "push --delete" does not.

* ps/push-delete-option:
push: add '-d' as shorthand for '--delete'
push: add '--delete' flag to synopsis

Documentation/git-push.txt
builtin/push.c
index 4c775bcec48360c3a097aea9cdb765ca9a9ec100..32482cec42d3ea5661813097919ff38657c2e01c 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
-          [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose]
+          [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
           [-u | --set-upstream]
           [--[no-]signed|--sign=(true|false|if-asked)]
           [--force-with-lease[=<refname>[:<expect>]]]
index 8963dbdf3da816bba595f7c4fcfdfd8bcdcd8670..960ffc31e1537441a1120dceb120ce584b7edccf 100644 (file)
@@ -538,7 +538,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
                OPT_BIT( 0 , "all", &flags, N_("push all refs"), TRANSPORT_PUSH_ALL),
                OPT_BIT( 0 , "mirror", &flags, N_("mirror all refs"),
                            (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
-               OPT_BOOL( 0, "delete", &deleterefs, N_("delete refs")),
+               OPT_BOOL('d', "delete", &deleterefs, N_("delete refs")),
                OPT_BOOL( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")),
                OPT_BIT('n' , "dry-run", &flags, N_("dry run"), TRANSPORT_PUSH_DRY_RUN),
                OPT_BIT( 0,  "porcelain", &flags, N_("machine-readable output"), TRANSPORT_PUSH_PORCELAIN),