summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-03-20 16:33:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-14 10:54:31 (GMT)
commit470be518623b0ca7a30bdb1fcef483f63a8e72ec (patch)
tree48eea01b7ed599b8e4c5aeb8a962367db721b510 /refs
parent68fb02e40de22d38cb8988c524e31f93dc40c224 (diff)
downloadgit-470be518623b0ca7a30bdb1fcef483f63a8e72ec.zip
git-470be518623b0ca7a30bdb1fcef483f63a8e72ec.tar.gz
git-470be518623b0ca7a30bdb1fcef483f63a8e72ec.tar.bz2
refs_read_raw_ref(): new function
Extract a new function from `refs_resolve_ref_unsafe()`. It will be useful elsewhere. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/refs-internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 6904986..6ee9f20 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -165,6 +165,10 @@ struct ref_update {
const char refname[FLEX_ARRAY];
};
+int refs_read_raw_ref(struct ref_store *ref_store,
+ const char *refname, unsigned char *sha1,
+ struct strbuf *referent, unsigned int *type);
+
/*
* Add a ref_update with the specified properties to transaction, and
* return a pointer to the new object. This function does not verify