Re: Git files data formats documentation

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

 



Junio C Hamano <junkio@xxxxxxx> wrote:
> Not quite.  An entry for a subtree is sorted as if a '/' is
> suffixed to its name.
> 
>         $ git ls-tree $T
>         100644 blob 2398e9f8892812607f5eee6ed0d5712c2e3de197	a-
>         100644 blob 7f07527a80bd8c2b1c5087d7ccfe61073b068374	a-b
>         040000 tree 23fddf6a57ff3ba98aa93fb71431276c3f1a3c40	a
>         100644 blob 2afe6dcc5466068b8dcc7263cece05d2adf044fe	a=
>         100644 blob efc73add7dd868242a66faf2a59b145f2a60b834	a=b
> 
> This is, by the way, consistent with the order of cache entries
> in the index file.

Arrrrgh.  I didn't realize that '/' was needed on the end of a tree
name when sorting its parent for output.  jgit was/is definately
doing this wrong.  And it all comes back to how the index operates,
doesn't it?  :-)

I've got to go back now and do some surgery on how jgit sorts
entries in a tree.  Clearly it would be incorrect with the example
you just gave.  It also would have thought that core GIT generated
a corrupt tree if it tried to read in your example.  Thank you for
taking the time to clarify it!

-- 
Shawn.
-
: 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]