Re: [PATCH 1/2] get_sha1_with_context: report features used in resolution
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 12, 2012, 02:36 UTC
- Message-ID
- <7vmx9t4pgj.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120111194210.GA12441@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> Most callers generally treat get_sha1 as a black box, giving > it a string from the user and expecting to get a sha1 in > return. The get_sha1_with_context function gives callers > more information about what happened while resolving the > object name so they can make better decisions about how to > use the result. We currently use this only to provide > information about the path entry used to find a blob. > > We don't currently provide any information about the > resolution rules that were used to reach the final object. > Some callers may want these in order to enforce a policy > that a particular subset of the lookup rules are used (e.g., > when serving remote requests). > > This patch adds a set of bit-fields that document the use of > particular features during an object lookup. > > Signed-off-by: Jeff King <peff@peff.net> > --- > The diffstat looks a little scary, but it is mostly just the internal > get_sha1 functions learning to pass the object_context around.
Hmm, shouldn't this also cover peel_to_type()? That would have made it also apply to the maintenance track.