Re: [PATCH 7/8] Makefile: stop having command-list.h depend on a wildcard
- From
Øystein Walle <oystwa@gmail.com>
- Date
- Oct 21, 2021, 22:46 UTC
- Message-ID
- <CAFaJEqtHdg7htFLyztVpJsWViC7rxRxknWpPHHcK_v8PoPxOig@mail.gmail.com>
- In-Reply-To
- <patch-7.8-0c6f9b80d3b-20211020T183533Z-avarab@gmail.com>
On Wed, 20 Oct 2021 at 20:40, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> Unfortunately we can't drop the old code completely due to the CMake > integration, see 061c2240b1b (Introduce CMake support for configuring > Git, 2020-06-12). It will keep using the older and slower script.
I took a quick stab at this earlier today and it's not too difficult to implement. I can take a deeper dive over the weekend if this patch series gets traction.
Show 7 quoted lines
> +header_only= > +case $1 in > +--entry-only) > + shift > + print_command_list $1 <"$1" > + exit 0 > + ;;
Why is "$1" given twice here? As far as I can tell print_command_list doesn't reference its arguments anymore.
> +# The old compatibility mode for CMmake. See 061c2240b1b (Introduce > +# CMake support for configuring Git, 2020-06-12)
s/CMmake/CMake/
Show 7 quoted lines
> +echo "static struct cmdname_help command_list[] = {"
> +grep -v \
> + -e '^#' \
> + -e '^git-fsck-objects ' \
> + "$1" |
> print_command_list "$1"
> +echo "};"I suppose it stems from this unchanged line. That can be changed to just `print_command_list`.
Øsse