mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
59b8283d55
When we look up a missing object with cat_one_file() what error we
print out currently depends on whether we'll error out early in
get_oid_with_context(), or if we'll get an error later from
oid_object_info_extended().
The --allow-unknown-type flag then changes whether we pass the
"OBJECT_INFO_ALLOW_UNKNOWN_TYPE" flag to get_oid_with_context() or
not.
The "-p" flag is yet another special-case in printing the same output
on the deadbeef OID as we'd emit on the deadbeef_short OID for the
"-s" and "-t" options, it also doesn't support the
"--allow-unknown-type" flag at all.
Let's test the combination of the two sets of [-t, -s, -p] and
[--{no-}allow-unknown-type] (the --no-allow-unknown-type is implicit
in not supplying it), as well as a [missing,bogus] object pair.
This extends tests added in
|
||
---|---|---|
.. | ||
hash-info | ||
oid | ||
README |
This directory contains various per-hash values that are used in the testsuite. Each file contains lines containing a key-value pair; blank lines and lines starting with `#` are ignored. The key and value are separated by whitespace (specifically, those whitespace in the default `$IFS`). The key consists only of shell identifier characters, and the value consists of a hash algorithm, colon, and value. The hash algorithm also consists only of shell identifier characters; it should match the value in object-file.c. For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use and to "32" if SHA-256 is in use: ---- rawsz sha1:20 rawsz sha256:32 ---- The keys and values used here are loaded by `test_oid_init` (see the README file in the "t" directory) and are used by calling `test_oid`.