]>
git.proxmox.com Git - libgit2.git/blob - src/refs.h
2 * Copyright (C) 2009-2011 the libgit2 contributors
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.
7 #ifndef INCLUDE_refs_h__
8 #define INCLUDE_refs_h__
12 #include "git2/refs.h"
13 #include "hashtable.h"
15 #define GIT_REFS_DIR "refs/"
16 #define GIT_REFS_HEADS_DIR GIT_REFS_DIR "heads/"
17 #define GIT_REFS_TAGS_DIR GIT_REFS_DIR "tags/"
18 #define GIT_REFS_REMOTES_DIR GIT_REFS_DIR "remotes/"
20 #define GIT_RENAMED_REF_FILE GIT_REFS_DIR "RENAMED-REF"
22 #define GIT_SYMREF "ref: "
23 #define GIT_PACKEDREFS_FILE "packed-refs"
24 #define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled "
26 #define GIT_HEAD_FILE "HEAD"
27 #define GIT_MERGE_HEAD_FILE "MERGE_HEAD"
28 #define GIT_REFS_HEADS_MASTER_FILE GIT_REFS_HEADS_DIR "master"
30 #define GIT_REFNAME_MAX 1024
32 struct git_reference
{
33 git_repository
*owner
;
40 git_hashtable
*packfile
;
41 git_hashtable
*loose_cache
;
46 void git_repository__refcache_free(git_refcache
*refs
);
47 int git_repository__refcache_init(git_refcache
*refs
);
49 int git_reference__normalize_name(char *buffer_out
, size_t out_size
, const char *name
);
50 int git_reference__normalize_name_oid(char *buffer_out
, size_t out_size
, const char *name
);