summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-01-16 15:16:44 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-01-16 15:16:44 -0800
commitcfbc880d8a407bcd2074dda4221d337daf72195c (patch)
treeeb1cd2d1be66c2b5604fbe3699b38aae984851b3 /src/status.c
parent1dbcc9fc4e6f5264d5bb46f6d7f744eb4a4063e4 (diff)
downloadlibgit2-cfbc880d8a407bcd2074dda4221d337daf72195c.tar.gz
Patch cleanup for merge
After reviewing the gitignore support with Vicent, we came up with a list of minor cleanups to prepare for merge, including: * checking git_repository_config error returns * renaming git_ignore_is_ignored and moving to status.h * fixing next_line skipping to include \r skips * commenting on where ignores are and are not included
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/status.c b/src/status.c
index 72ee7b049..3ead15a87 100644
--- a/src/status.c
+++ b/src/status.c
@@ -761,3 +761,18 @@ static int alphasorted_futils_direach(
git_vector_free(&entry_names);
return error;
}
+
+
+int git_status_should_ignore(git_repository *repo, const char *path, int *ignored)
+{
+ int error;
+ git_vector ignores = GIT_VECTOR_INIT;
+
+ if ((error = git_ignore__for_path(repo, path, &ignores)) == GIT_SUCCESS)
+ error = git_ignore__lookup(&ignores, path, ignored);
+
+ git_ignore__free(&ignores);
+
+ return error;
+}
+