{"thread":{"id":"48453","subject":"[PATCH] completion: add diff --color-moved and config diff.colorMoved","startedAt":"2018-05-10T09:52:29Z","lastAt":"2018-05-10T09:52:29Z","messageCount":1,"participants":["John Marshall"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"347204","messageId":"20180510090625.GA60244@pc228-127.tcrc.gla.ac.uk","threadId":"48453","inReplyTo":null,"subject":"[PATCH] completion: add diff --color-moved and config diff.colorMoved","fromName":"John Marshall","fromEmail":"john.w.marshall@glasgow.ac.uk","sentAt":"2018-05-10T09:06:25Z","receivedAt":"2018-05-10T09:52:29Z","isPatch":true,"sender":{"key":"john.w.marshall@glasgow.ac.uk","avatar":null},"body":"Complete the --color-moved option wherever we complete --diff-algorithm.\n\nSigned-off-by: John Marshall <John.W.Marshall@glasgow.ac.uk>\n---\nComplete this recently-added option in a slightly over-the-top number of\nplaces. Patch based on the maint branch.\n\nCheers,\n\n    John\n\n contrib/completion/git-completion.bash | 24 ++++++++++++++++++++++--\n 1 file changed, 22 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex b09c8a236..4e09aebd0 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1383,9 +1383,12 @@ __git_diff_algorithms=\"myers minimal patience histogram\"\n\n __git_diff_submodule_formats=\"diff log short\"\n\n+__git_diff_colormoveds=\"no default plain zebra dimmed_zebra\"\n+\n __git_diff_common_options=\"--stat --numstat --shortstat --summary\n-                       --patch-with-stat --name-only --name-status --color\n-                       --no-color --color-words --no-renames --check\n+                       --patch-with-stat --name-only --name-status\n+                       --color --no-color --color-moved --no-color-moved\n+                       --color-words --no-renames --check\n                        --full-index --binary --abbrev --diff-filter=\n                        --find-copies-harder --ignore-cr-at-eol\n                        --text --ignore-space-at-eol --ignore-space-change\n@@ -1406,6 +1409,10 @@ _git_diff ()\n        __git_has_doubledash && return\n\n        case \"$cur\" in\n+       --color-moved=*)\n+               __gitcomp \"$__git_diff_colormoveds\" \"\" \"${cur##--color-moved=}\"\n+               return\n+               ;;\n        --diff-algorithm=*)\n                __gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n                return\n@@ -1702,6 +1709,10 @@ _git_log ()\n                __gitcomp \"full short no\" \"\" \"${cur##--decorate=}\"\n                return\n                ;;\n+       --color-moved=*)\n+               __gitcomp \"$__git_diff_colormoveds\" \"\" \"${cur##--color-moved=}\"\n+               return\n+               ;;\n        --diff-algorithm=*)\n                __gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n                return\n@@ -2165,6 +2176,10 @@ _git_config ()\n                        \"\n                return\n                ;;\n+       diff.color[Mm]oved)\n+               __gitcomp \"false true $__git_diff_colormoveds\"\n+               return\n+               ;;\n        diff.submodule)\n                __gitcomp \"log short\"\n                return\n@@ -2393,6 +2408,7 @@ _git_config ()\n                credential.username\n                credentialCache.ignoreSIGHUP\n                diff.autorefreshindex\n+               diff.colorMoved\n                diff.external\n                diff.ignoreSubmodules\n                diff.mnemonicprefix\n@@ -2741,6 +2757,10 @@ _git_show ()\n                        \" \"\" \"${cur#*=}\"\n                return\n                ;;\n+       --color-moved=*)\n+               __gitcomp \"$__git_diff_colormoveds\" \"\" \"${cur##--color-moved=}\"\n+               return\n+               ;;\n        --diff-algorithm=*)\n                __gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n                return\n--\n2.17.0\n\n\n[University of Glasgow: The Times Scottish University of the Year 2018]\n"}]}