# [PATCH 0/5] [RESEND] Minor additions to git-completion.bash

8 messages from 2013-04-29 to 2013-04-29. Participants: Ramkumar Ramachandra, Junio C Hamano.
Thread: https://gitlist.dev/t/33670

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 0/5] [RESEND] Minor additions to git-completion.bash
Message-ID: <1367239781-5232-1-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-1-git-send-email-artagnon%40gmail.com

```
Junio C Hamano wrote:
> I do not have the original series, so a resend with Felipe's Acked-by
> after your original Sign-off would be nice.

Felipe Contreras wrote:
> I only gave them a quick look.

This is an unmodified resend of [1] rebased onto the latest `master`.
I have not added Felipe's Acked-by.  Please do the needful.

Thanks.

[1]: http://article.gmane.org/gmane.comp.version-control.git/221947

Ramkumar Ramachandra (5):
  git-completion.bash: lexical sorting for diff.statGraphWidth
  git-completion.bash: add diff.submodule to config list
  git-completion.bash: complete branch.*.rebase as boolean
  git-completion.bash: add branch.*.pushremote to config list
  git-completion.bash: add remote.pushdefault to config list

 contrib/completion/git-completion.bash | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 1/5] git-completion.bash: lexical sorting for diff.statGraphWidth
Message-ID: <1367239781-5232-2-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-2-git-send-email-artagnon%40gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
df44483a (diff --stat: add config option to limit graph width,
2012-03-01) added the option diff.startGraphWidth to the list of
configuration variables in git-completion.bash, but failed to notice
that the list is sorted alphabetically.  Move it to its rightful place
in the list.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index bc3fc9e..61ccb19 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2051,13 +2051,13 @@ _git_config ()
 		core.whitespace
 		core.worktree
 		diff.autorefreshindex
-		diff.statGraphWidth
 		diff.external
 		diff.ignoreSubmodules
 		diff.mnemonicprefix
 		diff.noprefix
 		diff.renameLimit
 		diff.renames
+		diff.statGraphWidth
 		diff.suppressBlankEmpty
 		diff.tool
 		diff.wordRegex
-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 2/5] git-completion.bash: add diff.submodule to config list
Message-ID: <1367239781-5232-3-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-3-git-send-email-artagnon%40gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
c47ef57 (diff: introduce diff.submodule configuration variable,
2012-11-13) introduced the diff.submodule configuration variable, but
forgot to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 61ccb19..ba46cd9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1857,6 +1857,10 @@ _git_config ()
 			"
 		return
 		;;
+	diff.submodule)
+		__gitcomp "log short"
+		return
+		;;
 	help.format)
 		__gitcomp "man info web html"
 		return
@@ -2058,6 +2062,7 @@ _git_config ()
 		diff.renameLimit
 		diff.renames
 		diff.statGraphWidth
+		diff.submodule
 		diff.suppressBlankEmpty
 		diff.tool
 		diff.wordRegex
-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 3/5] git-completion.bash: complete branch.*.rebase as boolean
Message-ID: <1367239781-5232-4-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-4-git-send-email-artagnon%40gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
6fac1b83 (completion: add missing config variables, 2009-06-29) added
"rebase" to the list of completions for "branch.*.*", but forgot to
specify completions for the values that this configuration variable
can take (namely "false" and "true").  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ba46cd9..7bb11a1 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1818,6 +1818,10 @@ _git_config ()
 		__gitcomp_nl "$(__git_refs)"
 		return
 		;;
+	branch.*.rebase)
+		__gitcomp "false true"
+		return
+		;;
 	remote.*.fetch)
 		local remote="${prev#remote.}"
 		remote="${remote%.fetch}"
-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 4/5] git-completion.bash: add branch.*.pushremote to config list
Message-ID: <1367239781-5232-5-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-5-git-send-email-artagnon%40gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
9f765ce (remote.c: introduce branch.<name>.pushremote, 2013-04-02)
introduced the configuration variable branch.*.pushremote, but forgot
to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7bb11a1..af271cc 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1810,7 +1810,7 @@ __git_config_get_set_variables ()
 _git_config ()
 {
 	case "$prev" in
-	branch.*.remote)
+	branch.*.remote|branch.*.pushremote)
 		__gitcomp_nl "$(__git_remotes)"
 		return
 		;;
@@ -1906,7 +1906,7 @@ _git_config ()
 		;;
 	branch.*.*)
 		local pfx="${cur%.*}." cur_="${cur##*.}"
-		__gitcomp "remote merge mergeoptions rebase" "$pfx" "$cur_"
+		__gitcomp "remote pushremote merge mergeoptions rebase" "$pfx" "$cur_"
 		return
 		;;
 	branch.*)
-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:49

Subject: [PATCH 5/5] git-completion.bash: add remote.pushdefault to config list
Message-ID: <1367239781-5232-6-git-send-email-artagnon@gmail.com>
URL: https://gitlist.dev/e/1367239781-5232-6-git-send-email-artagnon%40gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
224c2171 (remote.c: introduce remote.pushdefault, 2013-04-02)
introduced the remote.pushdefault configuration variable, but forgot
to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index af271cc..2bbd8a3 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1822,6 +1822,10 @@ _git_config ()
 		__gitcomp "false true"
 		return
 		;;
+	remote.pushdefault)
+		__gitcomp_nl "$(__git_remotes)"
+		return
+		;;
 	remote.*.fetch)
 		local remote="${prev#remote.}"
 		remote="${remote%.fetch}"
@@ -2201,6 +2205,7 @@ _git_config ()
 		receive.fsckObjects
 		receive.unpackLimit
 		receive.updateserverinfo
+		remote.pushdefault
 		remotes.
 		repack.usedeltabaseoffset
 		rerere.autoupdate
-- 
1.8.2.1.616.ga1e5536.dirty

```

## Ramkumar Ramachandra, 2013-04-29 12:50

Subject: Re: [PATCH 0/5] [RESEND] Minor additions to git-completion.bash
Message-ID: <CALkWK0koi9UwN9uRUci3ictpMy_T5TMey_t9fNNM4HpBvqEG0A@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0koi9UwN9uRUci3ictpMy_T5TMey_t9fNNM4HpBvqEG0A%40mail.gmail.com
In-Reply-To: <1367239781-5232-1-git-send-email-artagnon@gmail.com>

```
[Corrected Felipe's email id; sorry, I'm having a bad day]

Ramkumar Ramachandra wrote:
> [...]

```

## Junio C Hamano, 2013-04-29 16:58

Subject: Re: [PATCH 0/5] [RESEND] Minor additions to git-completion.bash
Message-ID: <7vr4htjmu3.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vr4htjmu3.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CALkWK0koi9UwN9uRUci3ictpMy_T5TMey_t9fNNM4HpBvqEG0A@mail.gmail.com>

```
Ramkumar Ramachandra <artagnon@gmail.com> writes:

> [Corrected Felipe's email id; sorry, I'm having a bad day]

They all look trivial enough, so I'll directly apply to the
integration branches.

Thanks.

```
