diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-12-06 13:08:21 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 08:57:34 -0800 |
commit | 24be352d52f96b2cace4d3e5f01f02917b7d649b (patch) | |
tree | c933564c7ccbb29558b4bedaf14605c52a5e7f0b /builtin/commit.c | |
parent | 8539b465341cc475f219ed46273a1c157bddafa0 (diff) |
t3701: add a test for the different `add -p` prompts
The `git add -p` command offers different prompts for regular diff hunks
vs mode change pseudo hunks vs diffs deleting files.
Let's cover this in the regresion test suite, in preparation for
re-implementing `git add -p` in C.
For the mode change prompt, we use a trick that lets this test case pass
even on systems without executable bit, i.e. where `core.filemode =
false` (such as Windows): we first add the file to the index with `git
add --chmod=+x`, and then call `git add -p` with `core.filemode` forced
to `true`. The file on disk has no executable bit set, therefore we will
see a mode change.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions