git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: torvalds@osdl.org, git@vger.kernel.org
Subject: Re: [RFC][PATCH] for_each_ref() returning heads in wrong order
Date: Sat, 23 Sep 2006 18:47:59 +0200	[thread overview]
Message-ID: <20060923164759.GP8259@pasky.or.cz> (raw)
In-Reply-To: <20060923160712.5890.73139.stgit@machine.or.cz>

Dear diary, on Sat, Sep 23, 2006 at 06:36:21PM CEST, I got a letter
where Petr Baudis <pasky@suse.cz> said that...
> Using the #next branch I've now hit a problem with git-fetch-pack
> master choosing refs/bases/master (I geuss created by StGIT) instead
> of refs/heads/master. The old upload-pack returned the refs in the order
> heads-tags-everything_else but the new one just goes for whatever order
> readdir() returns them in (modulo merging with packed refs). I actually
> can't see the difference that caused this right now, though.

Portion of this is obsolete, I've since noticed what the difference
actually is - the _old_ one processed the directory unsorted and the new
one actually keeps it sorted in add_ref().

Alternate approach would be just to modify add_ref() sort order to take
heads and tags into account (but you still need to keep the cmp hack for
merging packed/loose refs). Should be pretty easy to do, but I
personally need to proceed with my TODO list for now since I've already
a working workaround.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

  reply	other threads:[~2006-09-23 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-23 16:36 [RFC][PATCH] for_each_ref() returning heads in wrong order Petr Baudis
2006-09-23 16:47 ` Petr Baudis [this message]
2006-09-23 17:20   ` Johannes Schindelin
2006-09-23 17:42     ` Petr Baudis
2006-09-23 17:12 ` Linus Torvalds
2006-09-23 19:31 ` Junio C Hamano

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=20060923164759.GP8259@pasky.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.org \
    /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).