mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
built-in add -p: implement the "stash" and "reset" patch modes
The `git stash` and `git reset` commands support a `--patch` option, and both simply hand off to `git add -p` to perform that work. Let's teach the built-in version of that command to be able to perform that work, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d2a233cb8b
commit
36bae1dc0e
@@ -25,6 +25,8 @@ int run_add_i(struct repository *r, const struct pathspec *ps);
|
||||
|
||||
enum add_p_mode {
|
||||
ADD_P_ADD,
|
||||
ADD_P_STASH,
|
||||
ADD_P_RESET,
|
||||
};
|
||||
|
||||
int run_add_p(struct repository *r, enum add_p_mode mode,
|
||||
|
||||
Reference in New Issue
Block a user