diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:42 +0300 |
commit | f4f7e75ad5ddb3e3cec0292f06dccae39020c416 (patch) | |
tree | 811ba2ae0bcbd071e74770fbc014f0adf2856e79 /t | |
parent | 9331bdbaf48073564f059fc04e8e1c3152f8d855 (diff) | |
parent | 42357b4e8b8bfb2626208c8816e9d8a2604d17b8 (diff) |
Merge branch 'es/rev-list-no-object-names'
"git rev-list --objects" learned with "--no-object-names" option to
squelch the path to the object that is used as a grouping hint for
pack-objects.
* es/rev-list-no-object-names:
rev-list: teach --no-object-names to enable piping
Diffstat (limited to 't')
-rwxr-xr-x | t/t6000-rev-list-misc.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh index 0507999729..52a9e38d66 100755 --- a/t/t6000-rev-list-misc.sh +++ b/t/t6000-rev-list-misc.sh @@ -48,6 +48,26 @@ test_expect_success 'rev-list --objects with pathspecs and copied files' ' ! grep one output ' +test_expect_success 'rev-list --objects --no-object-names has no space/names' ' + git rev-list --objects --no-object-names HEAD >output && + ! grep wanted_file output && + ! grep unwanted_file output && + ! grep " " output +' + +test_expect_success 'rev-list --objects --no-object-names works with cat-file' ' + git rev-list --objects --no-object-names --all >list-output && + git cat-file --batch-check <list-output >cat-output && + ! grep missing cat-output +' + +test_expect_success '--no-object-names and --object-names are last-one-wins' ' + git rev-list --objects --no-object-names --object-names --all >output && + grep wanted_file output && + git rev-list --objects --object-names --no-object-names --all >output && + ! grep wanted_file output +' + test_expect_success 'rev-list A..B and rev-list ^A B are the same' ' git commit --allow-empty -m another && git tag -a -m "annotated" v1.0 && |