cat-file: quote-format name in error when using -z
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest1 patch 6 repliesIn review
- v42 patches 3 repliesSuperseded
- v31 patch 1 replySuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 1 patch | 0 replies | Superseded | |
| v1 | 1 patch | 11 replies | Superseded |
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | cat-file: quote-format name in error when using -zbuiltin/ t/ | +46 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/1] cat-file: quote-format name in error when using -z
This is the fifth revision of this patch. The code changes are identical to v3, but there was one comment[1] about adding test coverage for batch_object_write(). In v4 I tried another approach, but that didn't work well. So for this version I'm just adding the test to version 3 as requested. See below the range-diff against v3, ignoring v4 ever happened.
Kind regards,
Toon
[1]: https://public-inbox.org/git/[email protected]/
Toon Claes (1):
cat-file: quote-format name in error when using -z
builtin/cat-file.c | 19 +++++++++++++++++++ t/t1006-cat-file.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+)
Range-diff against v3:
1: 16f7a123d8 ! 1: 14bccfa9fd cat-file: quote-format name in error when using -z
@@ t/t1006-cat-file.sh: test_expect_success FUNNYNAMES '--batch-check, -z with newl
+ printf "\"HEAD:newline\\\\nmissing\" missing\n" >expect &&
+ test_cmp expect actual
+'
++
++test_expect_success FUNNYNAMES '--batch-check, -z with missing object having newline in name' '
++ git init missing-object-newline &&
++ (
++ cd missing-object-newline &&
++ file="newline${LF}embedded" &&
++ echo_without_newline "hello" > $file &&
++ git add "$file" &&
++ git commit -m "file with newline embedded" &&
++ test_tick &&
++
++ sha1=$(git rev-parse HEAD:"$file") &&
++ rm .git/objects/$(test_oid_to_path $sha1) &&
++ printf "HEAD:$file" >in &&
++ git cat-file --batch-check -z <in >actual &&
++ printf "\"HEAD:newline\\\\nembedded\" missing\n" >expect &&
++ test_cmp expect actual
++ )
++'
+
batch_command_multiple_info="info $hello_sha1
info $tree_sha1--
2.40.1