diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-30 14:15:13 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-30 14:15:14 -0700 |
| commit | 6c5be97e4eee040a2d5303e5650fa7cc8a37dbd8 (patch) | |
| tree | e473e1ea7754091c4e4b13e1af93c9cc3638dcba /t/t1007-hash-object.sh | |
| parent | 988499e2955f052fa5f58434e13d12285cb8a361 (diff) | |
| parent | 4674ab682dc1a875fd29de8f4e9568196a88b97b (diff) | |
| download | git-6c5be97e4eee040a2d5303e5650fa7cc8a37dbd8.tar.gz | |
Merge branch 'jc/undecided-is-not-necessarily-sha1-fix'
The base topic started to make it an error for a command to leave
the hash algorithm unspecified, which revealed a few commands that
were not ready for the change. Give users a knob to revert back to
the "default is sha-1" behaviour as an escape hatch, and start
fixing these breakages.
* jc/undecided-is-not-necessarily-sha1-fix:
apply: fix uninitialized hash function
builtin/hash-object: fix uninitialized hash function
builtin/patch-id: fix uninitialized hash function
t1517: test commands that are designed to be run outside repository
setup: add an escape hatch for "no more default hash algorithm" change
Diffstat (limited to 't/t1007-hash-object.sh')
| -rwxr-xr-x | t/t1007-hash-object.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index 64aea38486..d73a5cc237 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -260,4 +260,10 @@ test_expect_success '--literally with extra-long type' ' echo example | git hash-object -t $t --literally --stdin ' +test_expect_success '--stdin outside of repository (uses SHA-1)' ' + nongit git hash-object --stdin <hello >actual && + echo "$(test_oid --hash=sha1 hello)" >expect && + test_cmp expect actual +' + test_done |
