Introduce entry point add_interactive and add_files_to_cache
This refactors builtin-add.c a little to provide a unique entry point for launching git add --interactive, which will be used by builtin-commit too. If we later want to make add --interactive a builtin or change how it is launched, we just start from this function. It also exports the private function update() which is used to add all modified paths to the index as add_files_to_cache(). Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a17ba31b0b
commit
5868016508
4
commit.h
4
commit.h
@ -128,4 +128,8 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads,
|
||||
int depth, int shallow_flag, int not_shallow_flag);
|
||||
|
||||
int in_merge_bases(struct commit *, struct commit **, int);
|
||||
|
||||
extern int interactive_add(void);
|
||||
extern void add_files_to_cache(int verbose, const char *prefix, const char **files);
|
||||
|
||||
#endif /* COMMIT_H */
|
||||
|
Reference in New Issue
Block a user