Re: [PATCH] [RFC] shell: allow overriding built-in commands
- From
Elijah Newren <newren@gmail.com>
- Date
- Mar 22, 2025, 17:39 UTC
- Message-ID
- <CABPp-BH9ia_GRNYx+zRCht3n0V=X-uLq2Zg+QWTWCyJfMkeznA@mail.gmail.com>
- In-Reply-To
- <pull.1930.git.git.1742637713157.gitgitgadget@gmail.com>
On Sat, Mar 22, 2025 at 3:02 AM Ayman Bagabas via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 11 quoted lines
> > From: Ayman Bagabas <ayman.bagabas@gmail.com> > > This patch allows overriding built-in commands by placing a script > with the same name under git-shell-commands directory. > > This is useful for users who want to extend the built-in commands > without replacing the original command binary. For instance, a user > wanting to allow only a subset of users to run the git-receive-pack > can override the command with a script that checks the user and > calls the original command if the user is allowed.
Sounds like it'd open a window to generating numerous security vulnerabilities, break git's own commands that exec another git subprocess (e.g. git-stash), make debugging git bug reports harder, and likely break programs that use plumbing commands.
I'd rather we didn't.