Fastest way to find repository heads?

Jelmer Vernooij jelmer at samba.org
Wed Jul 8 23:04:54 BST 2009


Robert Collins wrote:
> On Wed, 2009-07-08 at 23:00 +0200, Jelmer Vernooij wrote:
>   
>> When talking to a git smart server and trying to figure out which
>> revisions to fetch, bzr-git has to provide the server with all of the
>> heads in the repository so that the client and the server can negotiate
>> which revisions have to be transferred.
>>     
>
> last I checked git didn't report all heads; it reports all refs, which
> is quite different. Our equivalent would be all the branch (tip +
> tags)s.
>   
That's true, but only finding live heads  breaks a common use case for
bzr/bzr-git: if you use a repository to workaround bzr not supporting
resuming "bzr branch". If a "bzr branch" command aborts halfway through
in a repository you can currently resume by removing the broken branch
and trying again. bzr-git will see the dead head created by the previous
"bzr branch" command and resume from the right revision.

Admittedly this is something that should ultimately be fixed by making
"bzr branch" do the right thing and leave a working branch behind, but
until then I think bzr-git should use dead and live heads rather than
just live heads.

Cheers,

jelmer



More information about the bazaar mailing list