Re: [RFC] origin link for cherry-pick and revert
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2008, 22:55 UTC
- Message-ID
- <20080910225518.GA24534@coredump.intra.peff.net>
- In-Reply-To
- <20080910223427.GB22739@cuci.nl>
On Thu, Sep 11, 2008 at 12:34:27AM +0200, Stephen R. van den Berg wrote:
> I see. Indeed. That's a lot better. > Did the binary search inside tree objects ever get implemented?
I believe it's still linear (and skimming tree-walk.c:find_tree_entry seems to confirm). However, one advantage of such an approach is that it will improve as tree lookup improves (e.g., I believe the pack v4 work included improvements in this area).
Show 7 quoted lines
> The downsides when doing that are: > - The lookup cost is small, but still noticable, since it is sometimes > done on every commit; using the in-commit origin headerfield solves > this at negligible cost. > - The origin information is no longer cryptographically protected (under > certain circumstances this could be considered an advantage and a > disadvantage at the same time).
Yes, those are inherent in the scheme, as is the upside that one can make and distribute such annotations separately from commit creation.
I haven't thought enough about it to decide whether there is a scenario where making such a "cherry-picked from" annotation might make use of that property.
-Peff