From: Shawn O. Pearce Date: Fri, 11 Sep 2009 14:36:51 GMT Subject: Re: bash_completion outside repo Message-ID: <20090911143651.GE1033@spearce.org> In-Reply-To: <20090911141730.GA384@coredump.intra.peff.net> Jeff King wrote: > I also question why it is using "git config --list" at all in snippets > like this: > > for i in $(git --git-dir="$d" config --list); do > case "$i" in > remote.*.url=*) > i="${i#remote.}" > echo "${i/.url=*/}" > ;; > esac > done > > instead of just using "git config --get-regexp 'remote\..*\.url'", which > would be slightly more efficient, and also doesn't have this bug. ;) F'king oversight. You are right, this should be --get-regexp. There isn't a reason here, probably other than "I forgot about --get-regexp when I wrote the original code". -- Shawn.