Re: [PATCH 8/8] refs: fix invalid old object IDs when migrating reflogs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 22, 2025, 22:09 UTC
- Message-ID
- <xmqqfrenri7m.fsf@gitster.g>
- In-Reply-To
- <20250722-pks-reflog-append-v1-8-183e5949de16@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> +print_all_reflog_entries () {
> + repo=$1 &&
> + test-tool -C "$repo" ref-store main for-each-reflog >reflogs &&
> + cat reflogs | while read reflog
> + do
> + echo "REFLOG: $reflog" &&
> + test-tool -C "$repo" ref-store main for-each-reflog-ent "$reflog" ||
> + return 1
> + doneLet's not cat a single file into a pipe. What is on the downstream side of such a pipe is always prepared to read from its standard input. I.e.
test-tool ... >reflogs && while read reflog do ... done <reflogs