Thread (41 messages) 41 messages, 5 authors, 2025-03-19

Re: [PATCH v3 4/6] rev-list: support delimiting objects with NUL bytes

From: Christian Couder <hidden>
Date: 2025-03-19 12:35:33

On Fri, Mar 14, 2025 at 1:01 AM Justin Tobler [off-list ref] wrote:
For now, the `--objects` and `--stdin` flag are the only options that
can be used in combination with `-z`. In a subsequent commit,
NUL-delimited support for other options is added. Other options that do
not make sense with be used in combination with `-z` are rejected.
s/with be used/when used/

[...]
+test_expect_success 'rev-list -z' '
+       test_when_finished rm -rf repo &&
+
+       git init repo &&
+       test_commit -C repo 1 &&
+       test_commit -C repo 2 &&
+
+       oid1=$(git -C repo rev-parse HEAD) &&
+       oid2=$(git -C repo rev-parse HEAD~) &&
It seems to me that HEAD is at commit 2 and HEAD~ at commit 1 instead
of the other way around.

It looks like there is the same issue in the test added in the next
patch ("[PATCH v3 5/6] rev-list: support NUL-delimited --boundary
option")
+       printf "%s\0%s\0" "$oid1" "$oid2" >expect &&
+       git -C repo rev-list -z HEAD >actual &&
+
+       test_cmp expect actual
+'
Otherwise the whole patch series looks good to me.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help