{"thread":{"id":"17208","subject":"[PATCH 5/5] bash: refactor 'git log --pretty=<format>' options","startedAt":"2009-01-16T16:02:15Z","lastAt":"2009-01-16T17:18:16Z","messageCount":2,"participants":["SZEDER Gábor","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"100747","messageId":"1232121735-10239-1-git-send-email-szeder@ira.uka.de","threadId":"17208","inReplyTo":null,"subject":"[PATCH 5/5] bash: refactor 'git log --pretty=<format>' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-01-16T16:02:15Z","receivedAt":"2009-01-16T16:02:15Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Both 'git log' and 'show' have the same '--pretty=<format>' option\nwith the same formats.  So refactor these formats into a common\nvariable.\n\nWhile at it, also add 'format:' to the list.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 3a26d2b..b5b40c2 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -947,6 +947,8 @@ _git_ls_tree ()\n \t__git_complete_file\n }\n \n+__git_log_pretty_formats=\"oneline short medium full fuller email raw format:\"\n+\n _git_log ()\n {\n \t__git_has_doubledash && return\n@@ -954,8 +956,7 @@ _git_log ()\n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n \t--pretty=*)\n-\t\t__gitcomp \"\n-\t\t\toneline short medium full fuller email raw\n+\t\t__gitcomp \"$__git_log_pretty_formats\n \t\t\t\" \"\" \"${cur##--pretty=}\"\n \t\treturn\n \t\t;;\n@@ -1487,8 +1488,7 @@ _git_show ()\n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n \t--pretty=*)\n-\t\t__gitcomp \"\n-\t\t\toneline short medium full fuller email raw\n+\t\t__gitcomp \"$__git_log_pretty_formats\n \t\t\t\" \"\" \"${cur##--pretty=}\"\n \t\treturn\n \t\t;;\n-- \n1.6.1.198.geb475f\n"},{"id":"100757","messageId":"20090116171816.GO10179@spearce.org","threadId":"17208","inReplyTo":"1232121735-10239-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH 5/5] bash: refactor 'git log --pretty=<format>' options","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-01-16T17:18:16Z","receivedAt":"2009-01-16T17:18:16Z","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> Both 'git log' and 'show' have the same '--pretty=<format>' option\n> with the same formats.  So refactor these formats into a common\n> variable.\n> \n> While at it, also add 'format:' to the list.\n> \n> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n\nFor all 3 patches in the series:\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\nThanks.\n\n-- \nShawn.\n"}]}