Thread (17 messages) flat view 17 messages, 2 authors, 2016-06-15

Re: [RFC/PATCH] tag: add --points-at list option

From: Jeff King <hidden>
Date: 2016-06-15 22:53:00

On Mon, Feb 06, 2012 at 02:45:58AM -0500, Jeff King wrote:
quoted
Hmm, the "filter->lines" code for "git tag -n" makes a similar error. It
should probably print nothing for objects that are not tags.
Ugh, this part of builtin/tag.c is riddled with small bugs. I'm
preparing a series that will fix them, and hopefully it should make
building your points-at patch on top much more pleasant.
So here's what I ended up with:

  [1/3]: tag: fix output of "tag -n" when errors occur
  [2/3]: tag: die when listing missing or corrupt objects
  [3/3]: tag: don't show non-tag contents with "-n"

I had hoped to have a 4th patch teach "tag -n" to use parse_object
instead of read_sha1_file directly. That way we could avoid reading tag
objects multiple times when things like "--contains" or "--points-at"
are used.  But we don't actually cache the body of an annotated tag,
only its headers. So the "tag -n" code has to read the object fresh.

I do still think it's worth using the parse_object interface for the
"--points-at" feature.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help