git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch
@ 2020-10-06 22:06 Robert Karszniewicz
  2020-10-06 22:06 ` [PATCH 2/2] git-completion.bash: stash-show: complete $__git_diff_common_options Robert Karszniewicz
  2020-10-07 17:54 ` [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Karszniewicz @ 2020-10-06 22:06 UTC (permalink / raw)
  To: git

At the same time also deduplicate those options from command completions
which use $__git_diff_common_options.

Signed-off-by: Robert Karszniewicz <avoidr@posteo.de>
---
 contrib/completion/git-completion.bash | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0a96ad87e7..f363554996 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1688,6 +1688,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
 			--submodule --submodule= --ignore-submodules
 			--indent-heuristic --no-indent-heuristic
 			--textconv --no-textconv
+			--patch --no-patch
 "
 
 _git_diff ()
@@ -2031,11 +2032,9 @@ _git_log ()
 			--no-walk --no-walk= --do-walk
 			--parents --children
 			--expand-tabs --expand-tabs= --no-expand-tabs
-			--patch
 			$merge
 			$__git_diff_common_options
 			--pickaxe-all --pickaxe-regex
-			--patch --no-patch
 			"
 		return
 		;;
@@ -2938,7 +2937,7 @@ _git_show ()
 		;;
 	--*)
 		__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
-			--oneline --show-signature --patch
+			--oneline --show-signature
 			--expand-tabs --expand-tabs= --no-expand-tabs
 			$__git_diff_common_options
 			"
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] git-completion.bash: stash-show: complete $__git_diff_common_options
  2020-10-06 22:06 [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Robert Karszniewicz
@ 2020-10-06 22:06 ` Robert Karszniewicz
  2020-10-07 17:54 ` [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Karszniewicz @ 2020-10-06 22:06 UTC (permalink / raw)
  To: git

Signed-off-by: Robert Karszniewicz <avoidr@posteo.de>
---
 contrib/completion/git-completion.bash | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index f363554996..83bc64607b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3020,7 +3020,10 @@ _git_stash ()
 		list,--*)
 			__gitcomp "--name-status --oneline --patch-with-stat"
 			;;
-		show,--*|branch,--*)
+		show,--*)
+			__gitcomp "$__git_diff_common_options"
+			;;
+		branch,--*)
 			;;
 		branch,*)
 			if [ $cword -eq 3 ]; then
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch
  2020-10-06 22:06 [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Robert Karszniewicz
  2020-10-06 22:06 ` [PATCH 2/2] git-completion.bash: stash-show: complete $__git_diff_common_options Robert Karszniewicz
@ 2020-10-07 17:54 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2020-10-07 17:54 UTC (permalink / raw)
  To: Robert Karszniewicz; +Cc: git

Robert Karszniewicz <avoidr@posteo.de> writes:

> At the same time also deduplicate those options from command completions
> which use $__git_diff_common_options.
>
> Signed-off-by: Robert Karszniewicz <avoidr@posteo.de>
> ---
>  contrib/completion/git-completion.bash | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Makes sense.  Will queue together with [2/2].  Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-07 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 22:06 [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Robert Karszniewicz
2020-10-06 22:06 ` [PATCH 2/2] git-completion.bash: stash-show: complete $__git_diff_common_options Robert Karszniewicz
2020-10-07 17:54 ` [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).