Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-05-04 03:37:25 +0400
committerRussell Belfer <rb@github.com>2012-05-04 03:37:25 +0400
commitf917481ee84cbba481c1854cccdedb2d98377d43 (patch)
treeb6276158b43f8d54358df5609fd0e508928306b2 /src/repository.h
parent3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e (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/repository.h')
-rw-r--r--src/repository.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/repository.h b/src/repository.h
index 1ffac58f1..91c69a655 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -98,6 +98,8 @@ struct git_repository {
* export */
void git_object__free(void *object);
+int git_object__resolve_to_type(git_object **obj, git_otype type);
+
int git_oid__parse(git_oid *oid, const char **buffer_out, const char *buffer_end, const char *header);
void git_oid__writebuf(git_buf *buf, const char *header, const git_oid *oid);
@@ -106,6 +108,8 @@ GIT_INLINE(git_attr_cache *) git_repository_attr_cache(git_repository *repo)
return &repo->attrcache;
}
+int git_repository_head_tree(git_tree **tree, git_repository *repo);
+
/*
* Weak pointers to repository internals.
*