Merge branch 'jc/hash-object' into maint
"hash-object --literally" introduced in v2.2 was not prepared to take a really long object type name. * jc/hash-object: write_sha1_file(): do not use a separate sha1[] array t1007: add hash-object --literally tests hash-object --literally: fix buffer overrun with extra-long object type git-hash-object.txt: document --literally option
This commit is contained in:
@@ -209,4 +209,15 @@ test_expect_success 'hash-object complains about truncated type name' '
|
||||
test_must_fail git hash-object -t bl --stdin </dev/null
|
||||
'
|
||||
|
||||
test_expect_success '--literally' '
|
||||
t=1234567890 &&
|
||||
echo example | git hash-object -t $t --literally --stdin
|
||||
'
|
||||
|
||||
test_expect_success '--literally with extra-long type' '
|
||||
t=12345678901234567890123456789012345678901234567890 &&
|
||||
t="$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t" &&
|
||||
echo example | git hash-object -t $t --literally --stdin
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user