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

Re: [PATCH] Add an option to git-ls-tree to display also the size of object

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

Jakub Narebski [off-list ref] writes:
Add -l/--long/--size option to git-ls-tree command, which displays
object size of an entry after object id (left-justified with minimum
width of 7 characters).
Not a NAK at all (but not an ACK either yet), but just asking
questions on some design considerations.

* Do these options do different things?  If not, why have more
  than one (or two, --long and its shorthand -l)?

* Why pad to 7 places?  Do we have a similar padding elsewhere?
  Will this ever used by non-scripts?  How does this padding
  affect parsers other than Perl that read this information?

* Does it make sense to show size information when giving a tree
  entry?  I realize not having it in the output would make the
  job of the script reading the output a bit harder, but if this
  output is meant also for human consumption I think it would
  not be so interesting and raise a confusion factor.

  Also I suspect that having to show the size of a tree object,
  expressed in terms of the canonical representation, might
  force packv4 aware ls-tree to convert its traversal efficient
  representation to the canonical one only to get its size.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help