diff options
author | Russell Belfer <rb@github.com> | 2012-05-04 03:37:25 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-05-04 03:37:25 +0400 |
commit | f917481ee84cbba481c1854cccdedb2d98377d43 (patch) | |
tree | b6276158b43f8d54358df5609fd0e508928306b2 /src/ignore.h | |
parent | 3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e (diff) |
Support reading attributes from index
Depending on the operation, we need to consider gitattributes
in both the work dir and the index. This adds a parameter to
all of the gitattributes related functions that allows user
control of attribute reading behavior (i.e. prefer workdir,
prefer index, only use index).
This fix also covers allowing us to check attributes (and
hence do diff and status) on bare repositories.
This was a somewhat larger change that I hoped because it had
to change the cache key used for gitattributes files.
Diffstat (limited to 'src/ignore.h')
-rw-r--r-- | src/ignore.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ignore.h b/src/ignore.h index 49f72bf25..809d2edbd 100644 --- a/src/ignore.h +++ b/src/ignore.h @@ -25,13 +25,14 @@ typedef struct { git_vector ign_global; } git_ignores; -extern int git_ignore__for_path( - git_repository *repo, const char *path, git_ignores *ign); +extern int git_ignore__for_path(git_repository *repo, const char *path, git_ignores *ign); extern int git_ignore__push_dir(git_ignores *ign, const char *dir); + extern int git_ignore__pop_dir(git_ignores *ign); extern void git_ignore__free(git_ignores *ign); + extern int git_ignore__lookup(git_ignores *ign, const char *path, int *ignored); #endif |