]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/add.c
legacy stash -p: respect the add.interactive.usebuiltin setting
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 21 Dec 2019 21:57:12 +0000 (21:57 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Dec 2019 00:06:21 +0000 (16:06 -0800)
commit90a6bb98d11a664f729dbb86c90d9c7a38ea825a
tree48d3d5ce4f9499176010e327a84c26c1bfc3d9ff
parent36bae1dc0ee777aa529dd955f2e619281265f262
legacy stash -p: respect the add.interactive.usebuiltin setting

As `git add` traditionally did not expose the `--patch=<mode>` modes via
command-line options, the scripted version of `git stash` had to call
`git add--interactive` directly.

But this prevents the built-in `add -p` from kicking in, as
`add--interactive` is the scripted version (which does not have a
"fall-back" to the built-in version).

So let's introduce support for internal switch for `git add` that the
scripted `git stash` can use to call the appropriate backend (scripted
or built-in, depending on `add.interactive.useBuiltin`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
git-legacy-stash.sh