diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-12-21 21:57:15 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-21 16:06:22 -0800 |
commit | cee6cb7300354740ff765c74d535ba5d5f9b332e (patch) | |
tree | 5b7f8beacf5976aca5ab24327a39ea8081e7955c /builtin/add.c | |
parent | built-in add -p: implement the "checkout" patch modes (diff) | |
download | tgif-cee6cb7300354740ff765c74d535ba5d5f9b332e.tar.xz |
built-in add -p: implement the "worktree" patch modes
This is a straight-forward port of 2f0896ec3ad4 (restore: support
--patch, 2019-04-25) which added support for `git restore -p`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c index 191856b036..b5927105aa 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -208,6 +208,8 @@ int run_add_interactive(const char *revision, const char *patch_mode, mode = ADD_P_RESET; else if (!strcmp(patch_mode, "--patch=checkout")) mode = ADD_P_CHECKOUT; + else if (!strcmp(patch_mode, "--patch=worktree")) + mode = ADD_P_WORKTREE; else die("'%s' not supported", patch_mode); |