diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-02-04 18:41:47 -0600 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-05 09:32:01 -0800 |
| commit | 3295c3539896750f742a56de0c4ac965f8d96303 (patch) | |
| tree | 11c2cce229b10b4324323adb9601315f5d6a7b5a /t/t6022-rev-list-missing.sh | |
| parent | c6d896bcfde1cfb626c8bc25c71d00662ef7f22c (diff) | |
| download | git-3295c3539896750f742a56de0c4ac965f8d96303.tar.gz | |
rev-list: extend print-info to print missing object type
Additional information about missing objects found in git-rev-list(1)
can be printed by specifying the `print-info` missing action for the
`--missing` option. Extend this action to also print missing object type
information inferred from its containing object. This token follows the
form `type=<type>` and specifies the expected object type of the missing
object.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Acked-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6022-rev-list-missing.sh')
| -rwxr-xr-x | t/t6022-rev-list-missing.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t6022-rev-list-missing.sh b/t/t6022-rev-list-missing.sh index 38afca6f09..3e2790d4c8 100755 --- a/t/t6022-rev-list-missing.sh +++ b/t/t6022-rev-list-missing.sh @@ -164,6 +164,7 @@ do oid="$(git rev-parse "$obj")" && path=".git/objects/$(test_oid_to_path $oid)" && + type_info=" type=$(git cat-file -t $oid)" && case $obj in HEAD:foo) @@ -184,7 +185,7 @@ do # get the expected oids. git rev-list --objects --no-object-names \ HEAD ^"$obj" >expect.raw && - echo "?$oid$path_info" >>expect.raw && + echo "?$oid$path_info$type_info" >>expect.raw && mv "$path" "$path.hidden" && git rev-list --objects --no-object-names \ |
