Files
git/Documentation
Emily Shaffer 42357b4e8b rev-list: teach --no-object-names to enable piping
Allow easier parsing by cat-file by giving rev-list an option to print
only the OID of a non-commit object without any additional information.
This is a short-term shim; later on, rev-list should be taught how to
print the types of objects it finds in a format similar to cat-file's.

Before this commit, the output from rev-list needed to be massaged
before being piped to cat-file, like so:

  git rev-list --objects HEAD | cut -f 1 -d ' ' |
    git cat-file --batch-check

This was especially unexpected when dealing with root trees, as an
invisible whitespace exists at the end of the OID:

  git rev-list --objects --filter=tree:1 --max-count=1 HEAD |
    xargs -I% echo "AA%AA"

Now, it can be piped directly, as in the added test case:

  git rev-list --objects --no-object-names HEAD | git cat-file --batch-check

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Change-Id: I489bdf0a8215532e540175188883ff7541d70e1b
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 13:13:04 -07:00
..
2019-06-13 13:23:03 -07:00
2019-05-09 00:37:27 +09:00
2019-03-18 15:54:17 +09:00
2018-06-25 13:22:36 -07:00
2019-01-23 11:37:29 -08:00
2019-01-23 11:37:29 -08:00
2019-03-20 15:16:06 +09:00
2019-06-13 13:19:41 -07:00
2019-01-23 11:37:29 -08:00
2019-04-25 16:41:14 +09:00
2018-09-17 13:53:55 -07:00
2019-01-23 11:37:29 -08:00
2019-01-23 11:37:29 -08:00
2019-03-18 14:45:21 +09:00
2018-12-26 14:59:37 -08:00
2019-04-22 11:14:45 +09:00
2019-05-09 00:37:27 +09:00