#1099345 /usr/lib/git-core/git-subtree: Executable script fails if run directly (ie not via /sur/bin/git)

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Ian Jackson
Date:
2025-03-02 19:00:02 UTC
Severity:
normal
#1099345#5
Date:
2025-03-02 18:57:48 UTC
From:
To:
Hi.  I have /usr/lib/git-core on my PATH because I like to be able to
write git-sub-command (which I find helps with tab completion without
the IME-unreliable bash completion system).

AIUI this is an intended and supported mode of operation.  It works
for (nearly) all git commands.  It worked with git-subtree in at least
some previous Debian releases.  But it does not work in trixie.
Looking at the script, it has 4 lines of shell boilerplate already.

For form's sake:

1. Steps

   apt install git
   /usr/lib/git-core/git-subtree

2. Expected output

   Usage message from git-subtree

3. Actual output

   It looks like either your git installation or your
   git-subtree installation is broken.
   [etc]

As a workaround I guess I can put a script called `git-subtree` on my
PATH ahead of /usr/lib/git-core.

Thanks,
Ian.