{"thread":{"id":"41017","subject":"[PATCH v2 1/2] push: add '--delete' flag to synopsis","startedAt":"2015-12-16T08:16:51Z","lastAt":"2015-12-16T08:16:52Z","messageCount":2,"participants":["Patrick Steinhardt"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"274558","messageId":"1450253812-17230-1-git-send-email-ps@pks.im","threadId":"41017","inReplyTo":null,"subject":"[PATCH v2 1/2] push: add '--delete' flag to synopsis","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2015-12-16T08:16:51Z","receivedAt":"2015-12-16T08:16:51Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The delete flag is not mentioned in the synopsis of `git-push`.\nAdd the flag to make it more discoverable.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n\nOnly change to version 1 [1] is a slightly altered commit message\nof the second commit. Previously, it suggested that '--delete' is\nthe only way to delete a remote ref with `git-push`, while there\nis also `git push origin :ref`.\n\n[1]: http://article.gmane.org/gmane.comp.version-control.git/282364\n\n Documentation/git-push.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 85a4d7d..e830c08 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]\n-\t   [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose]\n+\t   [--repo=<repository>] [-f | --force] [--delete] [--prune] [-v | --verbose]\n \t   [-u | --set-upstream]\n \t   [--[no-]signed|--sign=(true|false|if-asked)]\n \t   [--force-with-lease[=<refname>[:<expect>]]]\n-- \n2.6.4\n"},{"id":"274559","messageId":"1450253812-17230-2-git-send-email-ps@pks.im","threadId":"41017","inReplyTo":"1450253812-17230-1-git-send-email-ps@pks.im","subject":"[PATCH v2 2/2] push: add '-d' as shorthand for '--delete'","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2015-12-16T08:16:52Z","receivedAt":"2015-12-16T08:16:52Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"It is possible to delete branches on remotes by specifying the\n'--delete' flag. The `git-branch` command, which can be used to\ndelete local branches with the same '--delete' flag, also accepts\nthe shorthand '-d'. This may cause confusion for users which are\nfrequently using the shorthand form of deleting local branches\nand subsequently try to use the same shorthand for `git-push`,\nwhich will fail.\n\nFix this usability issue by adding the '-d' shorthand to\n`git-push` and document it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n Documentation/git-push.txt | 2 +-\n builtin/push.c             | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex e830c08..6f5d98c 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]\n-\t   [--repo=<repository>] [-f | --force] [--delete] [--prune] [-v | --verbose]\n+\t   [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]\n \t   [-u | --set-upstream]\n \t   [--[no-]signed|--sign=(true|false|if-asked)]\n \t   [--force-with-lease[=<refname>[:<expect>]]]\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 3bda430..093011d 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -540,7 +540,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT( 0 , \"all\", &flags, N_(\"push all refs\"), TRANSPORT_PUSH_ALL),\n \t\tOPT_BIT( 0 , \"mirror\", &flags, N_(\"mirror all refs\"),\n \t\t\t    (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),\n-\t\tOPT_BOOL( 0, \"delete\", &deleterefs, N_(\"delete refs\")),\n+\t\tOPT_BOOL('d', \"delete\", &deleterefs, N_(\"delete refs\")),\n \t\tOPT_BOOL( 0 , \"tags\", &tags, N_(\"push tags (can't be used with --all or --mirror)\")),\n \t\tOPT_BIT('n' , \"dry-run\", &flags, N_(\"dry run\"), TRANSPORT_PUSH_DRY_RUN),\n \t\tOPT_BIT( 0,  \"porcelain\", &flags, N_(\"machine-readable output\"), TRANSPORT_PUSH_PORCELAIN),\n-- \n2.6.4\n"}]}