Re: [EGIT PATCH 1/6] Make sure we get the right storage for loose/pack/loose and packed refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> wrote:
> onsdag 20 maj 2009 23:43:59 skrev "Shawn O. Pearce" <spearce@xxxxxxxxxxx>:
> 
> I agree. For decorating the history it's convenient, but it's inconsistent. For some reason
> it was harder to see without the unit tests. All kinds of things slip by when testing is
> done on the surface only.
> 
> I'll update, and and even more tests. 

Thanks.
 
> Should we use multiple Ref objects for symrefs? I.e. a Ref referring to another in a chain,
> with all symrefs in between visible?

Yea, I'm starting to think that we should expose a symref as a Ref that
contains a nested Ref.  The getObjectId() / getPeeledObjectId() of any
of those Refs in that chain should return the leaf node value, but the
name of each Ref should be the name of the symref.

So readRef(HEAD) yields:

  Ref {
    name = "HEAD"
    next = Ref {
      name = "refs/heads/master"
      next = null
      objectId = ....
    }
  }

That may break some callers though, as they'd now get HEAD instead
of master as the name of the return value.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]