On Fri, Aug 19, 2016 at 02:59:32PM +0200, Johannes Schindelin wrote:
> > The only thing that somewhat is worrysome is what would happen to
> > %(rest).
> What would happen is that it would print out the path, as it is exactly
> that "rest" field that is used in the implementation, piggybacking on that
> very nice feature.
Good, that is what I would expect to happen.
> Of course, this means that you simply cannot send "SHA-1 path rest" to
> cat-file --batch and expect that to work. Should anybody need that in the
> future, they can give it a try themselves to patch cat-file.
Right. The real motivation for %(rest) was to accept "git rev-list
--objects" format, so you can do stuff like:
git rev-list --objects --all |
git cat-file --batch-check='%(objectsize) %(rest)' |
sort -rn |
to get the paths of the largest objects. So the fact that "%(rest)" will
be the filename in this case is almost certainly the most useful default
(and if somebody really wants something else, they can try to figure out
other semantics later).
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html