Hi, this patch series is a follow-up to my recent series that got rid of our strict dependency on Perl for running our test suite [1]. The goal of it is to remove the dependency on Perl in a couple more areas: - git-filter-branch(1) - git-request-pull(1) - Building our documentation. With these converted you can get a fully-functioning Git distribution with only a small handful of features missing: - gitweb. - Scripts to import repositories from GNU Arch, CVS and Subversion. - git-send-email. - Our Perl bindings, obviously. - The netrc credential helper from "contrib/". None of these feel critical for day-to-day usage of Git, so Perl is now a truly-optional dependency of Git. The series is built on top of 485f5f86361 (The fourth batch, 2025-04-08) with ps/test-wo-perl-prereq at 7a7b6022670 (t5703: refactor test to not depend on Perl, 2025-04-03) merged into it. Changes in v2: - Loosen up semantics when parsing "^{}" from git-ls-remote(1) so that the new behaviour matches the old one. - Fix indentation of a couple of case statements. - Remove explicit `in "$@"` in a for loop. - Link to v1: https://lore.kernel.org/r/20250415-b4-pks-drop-perl-v1-0-c6addf175858@xxxxxx Thanks! Patrick [1]: <20250320-b4-pks-t-perlless-v1-0-b1eefe27ac55@xxxxxx> --- Patrick Steinhardt (4): filter-branch: stop depending on Perl request-pull: stop depending on Perl Documentation: stop depending on Perl to massage user manual Documentation: stop depending on Perl to generate command list Documentation/Makefile | 8 ++-- Documentation/cmd-list.perl | 80 ---------------------------------- Documentation/cmd-list.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++ Documentation/fix-texi.perl | 15 ------- Documentation/fix-texi.sh | 21 +++++++++ Documentation/meson.build | 4 +- git-filter-branch.sh | 37 ++++++++-------- git-request-pull.sh | 74 ++++++++++++++++--------------- meson.build | 2 +- t/t5150-request-pull.sh | 6 --- 10 files changed, 191 insertions(+), 160 deletions(-) Range-diff versus v1: 1: d0aa04cb2e9 = 1: b48e33ada07 filter-branch: stop depending on Perl 2: 0fc604b849d ! 2: 31f54bd63e4 request-pull: stop depending on Perl @@ git-request-pull.sh: fi + while read sha1 ref + do + case "$ref" in -+ *"^{}") -+ ref="${ref%"^{}"}" ++ *"^"?*) ++ ref="${ref%"^"*}" + deref=true + ;; + *) 3: 75dd9df3d83 = 3: 788fb204917 Documentation: stop depending on Perl to massage user manual 4: 9c4b5c330b4 ! 4: c770a80762b Documentation: stop depending on Perl to generate command list @@ Documentation/cmd-list.sh (new) + while read line + do + case "$state" in -+ 0) -+ case "$line" in -+ git*\(*\)|scalar*\(*\)) -+ mansection="${line##*\(}" -+ mansection="${mansection%\)}" -+ ;; -+ NAME) -+ state=1;; -+ esac -+ ;; -+ 1) -+ if test "$line" = "----" -+ then -+ state=2 -+ fi -+ ;; -+ 2) -+ description="$line" -+ break ++ 0) ++ case "$line" in ++ git*\(*\)|scalar*\(*\)) ++ mansection="${line##*\(}" ++ mansection="${mansection%\)}" + ;; ++ NAME) ++ state=1;; ++ esac ++ ;; ++ 1) ++ if test "$line" = "----" ++ then ++ state=2 ++ fi ++ ;; ++ 2) ++ description="$line" ++ break ++ ;; + esac + done <"$path" + @@ Documentation/cmd-list.sh (new) + fi + + case "$description" in -+ "$command - "*) -+ text="${description#$command - }" ++ "$command - "*) ++ text="${description#$command - }" + -+ printf "linkgit:%s[%s]::\n\t" "$command" "$mansection" -+ case "$attributes" in -+ *" deprecated "*) -+ printf "(deprecated) " -+ ;; -+ esac -+ printf "$text.\n\n" -+ ;; -+ *) -+ echo >&2 "Description does not match $command: $description" -+ exit 1 ++ printf "linkgit:%s[%s]::\n\t" "$command" "$mansection" ++ case "$attributes" in ++ *" deprecated "*) ++ printf "(deprecated) " + ;; ++ esac ++ printf "$text.\n\n" ++ ;; ++ *) ++ echo >&2 "Description does not match $command: $description" ++ exit 1 ++ ;; + esac +} + @@ Documentation/cmd-list.sh (new) +build_dir="$2" +shift 2 + -+for out in "$@" ++for out +do + category="${out#cmds-}" + category="${category%.adoc}" --- base-commit: b09b3d4791ed248fed65de18cd6d8c084f7f0280 change-id: 20250409-b4-pks-drop-perl-574571234e3c