diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-18 01:12:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-22 17:05:05 -0800 |
commit | b6ec1d619fb54642388063a88e2255556cf5de06 (patch) | |
tree | 47f2fb8aecb3cb86b6d46961ed51ded21c71a220 /cache.h | |
parent | ee425e4643aa2d7be72cb4586d7554cecce44d6e (diff) | |
download | git-b6ec1d619fb54642388063a88e2255556cf5de06.tar.gz |
Fix add_files_to_cache() to take pathspec, not user specified list of files
This separates the logic to limit the extent of change to the
index by where you are (controlled by "prefix") and what you
specify from the command line (controlled by "pathspec").
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -604,13 +604,15 @@ extern void trace_argv_printf(const char **argv, int count, const char *format, extern int convert_to_git(const char *path, const char *src, size_t len, struct strbuf *dst); extern int convert_to_working_tree(const char *path, const char *src, size_t len, struct strbuf *dst); +/* add */ +void add_files_to_cache(int verbose, const char *prefix, const char **pathspec); + /* diff.c */ extern int diff_auto_refresh_index; /* match-trees.c */ void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, int); - /* ls-files */ int pathspec_match(const char **spec, char *matched, const char *filename, int skiplen); int report_path_error(const char *ps_matched, const char **pathspec, int prefix_offset); |