Re: [PATCH v4 2/4] completion: simplify __git_remotes

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v4 2/4] completion: simplify __git_remotes

From: SZEDER Gábor <hidden>
Date: 2016-06-15 22:53:00

Hi,


On Thu, Feb 02, 2012 at 10:30:23PM +0200, Felipe Contreras wrote:
quoted hunk
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b435b6d..f86b734 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -644,12 +644,7 @@ __git_refs_remotes ()
 __git_remotes ()
 {
 	local i ngoff IFS=$'\n' d="$(__gitdir)"
You could also remove the ngoff variable, because with this patch it's
not used anymore.
-	__git_shopt -q nullglob || ngoff=1
-	__git_shopt -s nullglob
-	for i in "$d/remotes"/*; do
-		echo ${i#$d/remotes/}
-	done
-	[ "$ngoff" ] && __git_shopt -u nullglob
+	test -d "$d/remotes" && ls -1 "$d/remotes"
 	for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do
 		i="${i#remote.}"
 		echo "${i/.url*/}"
-- 
1.7.9

Re: [PATCH v4 2/4] completion: simplify __git_remotes

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:53:00

2012/2/6 SZEDER Gábor [off-list ref]:
On Thu, Feb 02, 2012 at 10:30:23PM +0200, Felipe Contreras wrote:
quoted
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b435b6d..f86b734 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -644,12 +644,7 @@ __git_refs_remotes ()
 __git_remotes ()
 {
      local i ngoff IFS=$'\n' d="$(__gitdir)"
You could also remove the ngoff variable, because with this patch it's
not used anymore.
Right, I thought I did that... The change must have been lost in one
of the many revisions =/

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help