Subject: Re: [PATCH v4 03/13] t/perf: add pack-objects filter and path-walk benchmark

From: Taylor Blau <[email-masked]>
Date: Tue, 19 May 2026 19:51:24 -0400

On Wed, May 13, 2026 at 09:18:45PM +0000, Derrick Stolee via GitGitGadget wrote:
> +	>depth2-dirs &&
> +	while read tdir
> +	do
> +		git ls-tree -d --name-only "HEAD:$tdir" 2>/dev/null || return 1
> +	done <top-dirs >depth2-dirs.raw &&
> +	sed "s|^|$tdir/|" <depth2-dirs.raw >depth2-dirs &&

Ugh, I think that this was a bad suggestion on my part, since $tdir
should be empty at this point.

Could we use --format here like so?

    while read tdir
    do
        git ls-tree -d --format="$tdir/%(path)" "HEAD:$tdir" || return 1
    done 2>/dev/null

I guess that breaks if $tdir contains a formatting atom, so perhaps we
should keep the spirit of the original (but using an intermediary file
instead of piping the output of Git to another command).

Sorry about that, I'm not sure why I thought that was a good idea when I
wrote it :-<.

Thanks,
Taylor