git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Petr Baudis <pasky@suse.cz>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] Git.pm: Add remote_refs() git-ls-remote frontend
Date: Sat, 25 Aug 2007 21:26:29 -0700	[thread overview]
Message-ID: <7v6432udje.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20070825221143.6514.22516.stgit@rover> (Petr Baudis's message of "Sun, 26 Aug 2007 00:11:44 +0200")

Petr Baudis <pasky@suse.cz> writes:

> diff --git a/git-remote.perl b/git-remote.perl
> index 01cf480..8ce8418 100755
> --- a/git-remote.perl
> +++ b/git-remote.perl
> @@ -128,10 +128,7 @@ sub update_ls_remote {
>  	return if (($harder == 0) ||
>  		   (($harder == 1) && exists $info->{'LS_REMOTE'}));
>  
> -	my @ref = map {
> -		s|^[0-9a-f]{40}\s+refs/heads/||;
> -		$_;
> -	} $git->command(qw(ls-remote --heads), $info->{'URL'});
> +	my @ref = keys %{$git->remote_refs($info->{'URL'}, [ 'heads' ])};
>  	$info->{'LS_REMOTE'} = \@ref;
>  }

IIRC, ls-remote returns refs sorted and this function returns
them as it receives.

Doesn't this change make @ref randomly ordered?  

  reply	other threads:[~2007-08-26  4:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-25 22:11 [PATCH] Git.pm: Add remote_refs() git-ls-remote frontend Petr Baudis
2007-08-26  4:26 ` Junio C Hamano [this message]
2007-08-26  9:58   ` Petr Baudis
2007-08-30  8:39 ` Jakub Narebski
2007-08-30 23:37   ` Petr Baudis
2007-08-30 23:37 ` Petr Baudis
2007-08-31  0:26   ` Junio C Hamano
2007-08-31  1:37     ` Petr Baudis
2007-08-31  2:13       ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2008-07-08 17:48 Petr Baudis
2007-05-17  2:37 Petr Baudis
2007-05-17  5:58 ` Junio C Hamano
2007-05-17 11:30   ` Petr Baudis

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=7v6432udje.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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).