diff options
| author | Philip Kelley <phkelley@hotmail.com> | 2012-10-16 08:34:28 -0700 |
|---|---|---|
| committer | Philip Kelley <phkelley@hotmail.com> | 2012-10-16 08:34:28 -0700 |
| commit | 9e37305aad734efb83f22b2e292a7591bbf49f15 (patch) | |
| tree | 91b7498ffd8f292bac418c9dc0067aead5a435fa /include/git2 | |
| parent | ebb867558e734d8c053dd1a292ff9861197bdc4d (diff) | |
| parent | 52032ae53689ac37350f6af3bf1834122e4b3cf0 (diff) | |
| download | libgit2-9e37305aad734efb83f22b2e292a7591bbf49f15.tar.gz | |
Merge pull request #984 from arrbee/fix-fnmatch-and-ignore
Fix single file ignores
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/ignore.h | 9 | ||||
| -rw-r--r-- | include/git2/status.h | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/include/git2/ignore.h b/include/git2/ignore.h index f7e04e881..964a108ce 100644 --- a/include/git2/ignore.h +++ b/include/git2/ignore.h @@ -54,9 +54,12 @@ GIT_EXTERN(int) git_ignore_clear_internal_rules( /** * Test if the ignore rules apply to a given path. * - * This function simply checks the ignore rules to see if they would apply - * to the given file. This indicates if the file would be ignored regardless - * of whether the file is already in the index or commited to the repository. + * This function checks the ignore rules to see if they would apply to the + * given file. This indicates if the file would be ignored regardless of + * whether the file is already in the index or commited to the repository. + * + * One way to think of this is if you were to do "git add ." on the + * directory containing the file, would it be added or not? * * @param ignored boolean returning 0 if the file is not ignored, 1 if it is * @param repo a repository object diff --git a/include/git2/status.h b/include/git2/status.h index cc94d7680..0dd98596e 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -146,10 +146,12 @@ GIT_EXTERN(int) git_status_file( /** * Test if the ignore rules apply to a given file. * - * This function simply checks the ignore rules to see if they would apply - * to the given file. Unlike git_status_file(), this indicates if the file - * would be ignored regardless of whether the file is already in the index - * or in the repository. + * This function checks the ignore rules to see if they would apply to the + * given file. This indicates if the file would be ignored regardless of + * whether the file is already in the index or commited to the repository. + * + * One way to think of this is if you were to do "git add ." on the + * directory containing the file, would it be added or not? * * @param ignored boolean returning 0 if the file is not ignored, 1 if it is * @param repo a repository object |
