summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-06-12 17:54:02 +0700
committerJunio C Hamano <gitster@pobox.com>2016-06-13 14:38:16 -0700
commit41da7111f2c825ee0dcd319ec246a84b5ca0fd21 (patch)
tree958e18cd733ee3f9febdcb7f2baf38bbae92affb /refs.h
parent6d43a0cefd769c650bd114f41434ef5a7aa998e7 (diff)
downloadgit-41da7111f2c825ee0dcd319ec246a84b5ca0fd21.tar.gz
refs: add expand_ref()
This is basically dwim_ref() without @{} support. To be used on the server side where we want to expand abbreviated to full ref names and nothing else. The first user is "git clone/fetch --shallow-exclude". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 3c3da29bf0..31a2fa68a3 100644
--- a/refs.h
+++ b/refs.h
@@ -90,6 +90,7 @@ extern int resolve_gitlink_ref(const char *path, const char *refname, unsigned c
*/
extern int refname_match(const char *abbrev_name, const char *full_name);
+extern int expand_ref(const char *str, int len, unsigned char *sha1, char **ref);
extern int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref);
extern int dwim_log(const char *str, int len, unsigned char *sha1, char **ref);