diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-01-09 15:37:19 -0800 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-01-11 14:39:51 -0800 |
commit | df743c7d3a04553ffc04ae7cbc64fb300e7f61d2 (patch) | |
tree | 7f0dfa714ddb292448cbeaa69f2b5d90a3274d85 /src/fileops.h | |
parent | 7e443f696068cd8c84a759e532c2845348e5a6ad (diff) | |
download | libgit2-df743c7d3a04553ffc04ae7cbc64fb300e7f61d2.tar.gz |
Initial implementation of gitignore support
Adds support for .gitignore files to git_status_foreach() and
git_status_file(). This includes refactoring the gitattributes
code to share logic where possible. The GIT_STATUS_IGNORED flag
will now be passed in for files that are ignored (provided they
are not already in the index or the head of repo).
Diffstat (limited to 'src/fileops.h')
-rw-r--r-- | src/fileops.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fileops.h b/src/fileops.h index 31f3e6a91..f3f09ec9f 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -102,6 +102,14 @@ extern int git_futils_mkpath2file(const char *path, const mode_t mode); extern int git_futils_rmdir_r(const char *path, int force); /** + * Get the directory for a path. + * + * If the path is a directory, this does nothing (save append a '/' as needed). + * If path is a normal file, this gets the directory containing it. + */ +extern int git_futils_dir_for_path(git_buf *dir, const char *path, const char *base); + +/** * Create and open a temporary file with a `_git2_` suffix. * Writes the filename into path_out. * @return On success, an open file descriptor, else an error code < 0. |