Skip to contentSkip to conversation

bash: Add completion for git diff --base --ours --theirs

PATCH In review Teemu Likonen 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bash: Add completion for git diff --base --ours --theirs

---

I guess these options should be documented in git-diff.txt too but I'm hesitant to do it because my understanding of merge stages isn't quite enough.

 contrib/completion/git-completion.bash |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
contrib/completion/git-completion.bash +1 -0
index 4d81963..6949cac 100755
@@ -641,6 +641,7 @@ _git_diff ()
 			--ignore-all-space --exit-code --quiet --ext-diff
 			--no-ext-diff
 			--no-prefix --src-prefix= --dst-prefix=
+			--base --ours --theirs
 			"
 		return
 		;;
Signature · 1 line
1.5.5.84.g295c
#1 lore raw

contrib/completion/git-completion.bash _git_diff () · line 647

Quoted 12 lines · Teemu Likonen
contrib/completion/git-completion.bash +1 -0
index 4d81963..6949cac 100755
@@ -641,6 +641,7 @@ _git_diff ()
 			--ignore-all-space --exit-code --quiet --ext-diff
 			--no-ext-diff
 			--no-prefix --src-prefix= --dst-prefix=
+			--base --ours --theirs
 			"
 		return
 		;;

Hmmph. I must not be paying enough attention to the mailing list. I didn't know these were supported on git-diff. Oh, wow, Linus added these, and he never documents things. No wonder they are undocumented. :)

Anyway. Acked-by: Shawn O. Pearce <[email protected]>

But documentation would be nice too. However I can see why you wouldn't want to contribute that; its easy enough to insert these flags into the completion, but its another matter to explain what they are actually doing for you.

Signature · 1 line
Shawn.