]> git.ipfire.org Git - thirdparty/git.git/commit
filter-branch: stop depending on Perl
authorPatrick Steinhardt <ps@pks.im>
Wed, 16 Apr 2025 12:16:07 +0000 (14:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2025 14:30:29 +0000 (07:30 -0700)
commitf6d855091e73fdab8a39185a8392b9d0df7ed46f
tree7f3d46cb862f888965e133154ac80e9329e2e6c8
parent55f7879f573cd1bd560426aea212e96441add5b2
filter-branch: stop depending on Perl

While git-filter-branch(1) is written as a shell script, the
`--state-branch` feature depends on Perl to save and extract the object
ID mappings. This can lead to subtle breakage though:

  - We execute `perl` directly without respecting the `PERL_PATH`
    configured by the distribution. As such, it may happen that we use
    the wrong version of Perl.

  - We install the script unchanged even if Perl isn't available at all
    on the system, so using `--state-branch` would lead to failure
    altogether in that case.

Fix this by dropping Perl and instead implementing the feature with
shell scripting exclusively.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.sh