diff options
author | Vicent Martà <vicent@github.com> | 2013-05-10 10:49:22 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-05-10 10:49:22 -0700 |
commit | 4a65aead2ce2003902f4b54b331af33af7340b58 (patch) | |
tree | 0b296dabdff035ae2a7eee66e078e6e46a5a3c2d /src | |
parent | c3a5171198d364b4fa37579ecbb791ffe7c8202b (diff) | |
parent | 1f9e41ee865ac3a9c60d39c7db212478c04bf86d (diff) | |
download | libgit2-4a65aead2ce2003902f4b54b331af33af7340b58.tar.gz |
Merge pull request #1571 from arrbee/what-if-ignorecase-lies
Improve ignore handling in git_status_file
Diffstat (limited to 'src')
-rw-r--r-- | src/status.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/status.c b/src/status.c index 73472ab14..89f3eedb5 100644 --- a/src/status.c +++ b/src/status.c @@ -266,6 +266,7 @@ int git_status_file( opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR; opts.flags = GIT_STATUS_OPT_INCLUDE_IGNORED | + GIT_STATUS_OPT_RECURSE_IGNORED_DIRS | GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS | GIT_STATUS_OPT_INCLUDE_UNMODIFIED; @@ -281,22 +282,9 @@ int git_status_file( } if (!error && !sfi.count) { - git_buf full = GIT_BUF_INIT; - - /* if the file actually exists and we still did not get a callback - * for it, then it must be contained inside an ignored directory, so - * mark it as such instead of generating an error. - */ - if (!git_buf_joinpath(&full, git_repository_workdir(repo), path) && - git_path_exists(full.ptr)) - sfi.status = GIT_STATUS_IGNORED; - else { - giterr_set(GITERR_INVALID, - "Attempt to get status of nonexistent file '%s'", path); - error = GIT_ENOTFOUND; - } - - git_buf_free(&full); + giterr_set(GITERR_INVALID, + "Attempt to get status of nonexistent file '%s'", path); + error = GIT_ENOTFOUND; } *status_flags = sfi.status; |