]> git.proxmox.com Git - libgit2.git/blame - src/attr.h
Merge pull request #600 from nulltoken/fix/windows-network-paths
[libgit2.git] / src / attr.h
CommitLineData
df743c7d 1/*
5e0de328 2 * Copyright (C) 2009-2012 the libgit2 contributors
df743c7d
RB
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7#ifndef INCLUDE_attr_h__
8#define INCLUDE_attr_h__
9
10#include "attr_file.h"
11
12typedef struct {
13 int initialized;
14 git_hashtable *files; /* hash path to git_attr_file of rules */
15 git_hashtable *macros; /* hash name to vector<git_attr_assignment> */
16} git_attr_cache;
17
18extern int git_attr_cache__init(git_repository *repo);
19
20extern int git_attr_cache__insert_macro(
21 git_repository *repo, git_attr_rule *macro);
22
b6c93aef
RB
23extern int git_attr_cache__lookup_or_create_file(
24 git_repository *repo,
25 const char *key,
26 const char *filename,
27 int (*loader)(git_repository *, const char *, git_attr_file *),
28 git_attr_file **file_ptr);
29
df743c7d
RB
30extern int git_attr_cache__push_file(
31 git_repository *repo,
32 git_vector *stack,
33 const char *base,
34 const char *filename,
a51cd8e6 35 int (*loader)(git_repository *, const char *, git_attr_file *));
df743c7d 36
e8c96ed2
RB
37/* returns GIT_SUCCESS if path is in cache */
38extern int git_attr_cache__is_cached(git_repository *repo, const char *path);
39
df743c7d 40#endif