From 586801650824f0f7b62c34a206b6a60ffbcd8be0 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 17 Sep 2007 20:06:44 -0400 Subject: Introduce entry point add_interactive and add_files_to_cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- commit.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index b779de8cbc..b50c30e255 100644 --- a/commit.h +++ b/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 */ -- cgit v1.2.3