summaryrefslogtreecommitdiff
path: root/src/ignore.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/ignore.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/ignore.c')
-rw-r--r--src/ignore.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/ignore.c b/src/ignore.c
index cdc3edab6..1040574d7 100644
--- a/src/ignore.c
+++ b/src/ignore.c
@@ -106,7 +106,7 @@ int git_ignore__for_path(git_repository *repo, const char *path, git_vector *sta
goto cleanup;
/* load core.excludesfile */
- if (git_repository_config(&cfg, repo) == GIT_SUCCESS) {
+ if ((error = git_repository_config(&cfg, repo)) == GIT_SUCCESS) {
const char *core_ignore;
error = git_config_get_string(cfg, GIT_IGNORE_CONFIG, &core_ignore);
if (error == GIT_SUCCESS && core_ignore != NULL)
@@ -157,18 +157,3 @@ found:
return error;
}
-
-
-int git_ignore_is_ignored(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;
-}
-