Re: [PATCH 8/8] refs: fix invalid old object IDs when migrating reflogs
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jul 23, 2025, 04:04 UTC
- Message-ID
- <aIBfVgOqZNrcpmh_@pks.im>
- In-Reply-To
- <xmqqfrenri7m.fsf@gitster.g>
On Tue, Jul 22, 2025 at 03:09:17PM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > +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
> > + done
>
> Let'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 <reflogsAh, makes sense. Will queue the change locally and send it out with the next version. Thanks!
Patrick