Re: [PATCH v3 4/6] rev-list: support delimiting objects with NUL bytes
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Mar 19, 2025, 12:35 UTC
- Message-ID
- <CAP8UFD1JAkTESnEOP621uECvoFGFmQ8SRd372hPLDhNzALAN+A@mail.gmail.com>
- In-Reply-To
- <20250313235747.9583-5-jltobler@gmail.com>
On Fri, Mar 14, 2025 at 1:01 AM Justin Tobler <jltobler@gmail.com> 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/
[...]
Show 9 quoted lines
> +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")
Show 5 quoted lines
> + 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.