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>
This commit is contained in:

committed by
Junio C Hamano

parent
6d43a0cefd
commit
41da7111f2
1
refs.h
1
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);
|
||||
|
||||
|
Reference in New Issue
Block a user