Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Why are ref_lists sorted?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:00

"Shawn O. Pearce" [off-list ref] writes:
We already have the ISPACKED flag in the flags field to tell us if
the ref is loose or not.  When inserting a ref into the hash table
you keep the loose version (either if its in the table, or the one
being inserted).
As long as you are careful enough not to break the unwrapped
entries, repacking and re-reading of refs (I think these three
are the reasons we have separate lists), I am fine with that
change.  I also think some callers of do_for_each_refs (this
includes the userland that use git-for-each-ref and/or
git-show-ref) expect the traversal to be sorted, so I would like
to keep that sorted output behaviour.

An additional hash to speed up look-up operation is probably a
good thing to have.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help