{"thread":{"id":"21869","subject":"[PATCH] bash: update 'git commit' completion","startedAt":"2009-12-05T00:51:41Z","lastAt":"2009-12-05T21:17:03Z","messageCount":2,"participants":["SZEDER Gábor","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129256","messageId":"1259974301-11593-1-git-send-email-szeder@ira.uka.de","threadId":"21869","inReplyTo":null,"subject":"[PATCH] bash: update 'git commit' completion","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-12-05T00:51:41Z","receivedAt":"2009-12-05T00:51:41Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"I just wanted to add the recently learnt '--reset-author' option, but\nthen noticed that there are many more options missing.  This patch\nadds support for all of 'git commit's options, except '--allow-empty',\nbecause it is primarily there for foreign scm interfaces.\n\nFurthermore, this patch also adds support for completing the arguments\nof those options that take a non-filename argument: valid modes are\noffered for '--cleanup' and '--untracked-files', while refs for\n'--reuse-message' and '--reedit-message', because these two take a\ncommit as argument.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash |   22 +++++++++++++++++++++-\n 1 files changed, 21 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 11bf17a..7c18b0c 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -896,11 +896,31 @@ _git_commit ()\n \n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n+\t--cleanup=*)\n+\t\t__gitcomp \"default strip verbatim whitespace\n+\t\t\t\" \"\" \"${cur##--cleanup=}\"\n+\t\treturn\n+\t\t;;\n+\t--reuse-message=*)\n+\t\t__gitcomp \"$(__git_refs)\" \"\" \"${cur##--reuse-message=}\"\n+\t\treturn\n+\t\t;;\n+\t--reedit-message=*)\n+\t\t__gitcomp \"$(__git_refs)\" \"\" \"${cur##--reedit-message=}\"\n+\t\treturn\n+\t\t;;\n+\t--untracked-files=*)\n+\t\t__gitcomp \"all no normal\" \"\" \"${cur##--untracked-files=}\"\n+\t\treturn\n+\t\t;;\n \t--*)\n \t\t__gitcomp \"\n \t\t\t--all --author= --signoff --verify --no-verify\n \t\t\t--edit --amend --include --only --interactive\n-\t\t\t--dry-run\n+\t\t\t--dry-run --reuse-message= --reedit-message=\n+\t\t\t--reset-author --file= --message= --template=\n+\t\t\t--cleanup= --untracked-files --untracked-files=\n+\t\t\t--verbose --quiet\n \t\t\t\"\n \t\treturn\n \tesac\n-- \n1.6.6.rc1.54.g791207\n"},{"id":"129289","messageId":"20091205211703.GC5610@spearce.org","threadId":"21869","inReplyTo":"1259974301-11593-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH] bash: update 'git commit' completion","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-12-05T21:17:03Z","receivedAt":"2009-12-05T21:17:03Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"SZEDER G??bor <szeder@ira.uka.de> wrote:\n> I just wanted to add the recently learnt '--reset-author' option, but\n> then noticed that there are many more options missing.  This patch\n> adds support for all of 'git commit's options, except '--allow-empty',\n> because it is primarily there for foreign scm interfaces.\n> \n> Furthermore, this patch also adds support for completing the arguments\n> of those options that take a non-filename argument: valid modes are\n> offered for '--cleanup' and '--untracked-files', while refs for\n> '--reuse-message' and '--reedit-message', because these two take a\n> commit as argument.\n> \n> Signed-off-by: SZEDER G??bor <szeder@ira.uka.de>\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\n>  contrib/completion/git-completion.bash |   22 +++++++++++++++++++++-\n>  1 files changed, 21 insertions(+), 1 deletions(-)\n\n-- \nShawn.\n"}]}