git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Thomas Rast <trast@inf.ethz.ch>, Todd Zullinger <tmz@pobox.com>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH v4 2/4] completion: simplify __git_remotes
Date: Mon, 6 Feb 2012 21:53:15 +0100	[thread overview]
Message-ID: <20120206205315.GI16099@goldbirke> (raw)
In-Reply-To: <1328214625-3576-3-git-send-email-felipe.contreras@gmail.com>

Hi,


On Thu, Feb 02, 2012 at 10:30:23PM +0200, Felipe Contreras wrote:
> 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
> 

  parent reply	other threads:[~2012-02-06 20:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 20:30 [PATCH v4 0/4] completion: couple of cleanups Felipe Contreras
     [not found] ` <1328214625-3576-2-git-send-email-felipe.contreras@gmail.com>
2012-02-03 20:23   ` [PATCH v4 1/4] completion: work around zsh option propagation bug Junio C Hamano
2012-02-06 22:59     ` Felipe Contreras
2012-02-06 23:20       ` Junio C Hamano
2012-02-06 23:57         ` Felipe Contreras
     [not found] ` <1328214625-3576-5-git-send-email-felipe.contreras@gmail.com>
2012-02-03 20:23   ` [PATCH v4 4/4] completion: simplify __gitcomp* Junio C Hamano
2012-02-04 13:54     ` SZEDER Gábor
2012-02-05 20:45       ` Junio C Hamano
2012-02-05 21:14         ` Felipe Contreras
     [not found] ` <1328214625-3576-3-git-send-email-felipe.contreras@gmail.com>
2012-02-06 20:53   ` SZEDER Gábor [this message]
2012-02-06 21:04     ` [PATCH v4 2/4] completion: simplify __git_remotes Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120206205315.GI16099@goldbirke \
    --to=szeder@ira.uka.de \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=junkio@cox.net \
    --cc=spearce@spearce.org \
    --cc=tmz@pobox.com \
    --cc=trast@inf.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).