path: root/commit.h
diff options
authorJunio C Hamano <>2007-11-25 18:10:10 (GMT)
committerJunio C Hamano <>2007-11-25 18:23:13 (GMT)
commit3f061887c562b20d3ed3d1f764462cf986a1ad12 (patch)
tree636a0f9c085aac7ba539ef2ace03b3081481891a /commit.h
parent324ccbd6a09816af830b22b02bbeb06349141849 (diff)
add -i: Fix running from a subdirectory
This fixes the pathspec interactive_add() passes to the underlying git-add--interactive helper. When the command was run from a subdirectory, cmd_add() already has gone up to the toplevel of the work tree, and the helper will be spawned from there. The pathspec given on the command line from the user needs to be adjusted for this. This adds "validate_pathspec()" function in the callchain, but it does not validate yet. The function can be changed to barf if there are unmatching pathspec given by the user, but that is not strictly necessary. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'commit.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/commit.h b/commit.h
index 9f0765b..10e2b5d 100644
--- a/commit.h
+++ b/commit.h
@@ -113,7 +113,7 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads,
int in_merge_bases(struct commit *, struct commit **, int);
-extern int interactive_add(int argc, const char **argv);
+extern int interactive_add(int argc, const char **argv, const char *prefix);
extern int rerere(void);
static inline int single_parent(struct commit *commit)