mirror of
https://github.com/git/git.git
synced 2024-11-28 12:34:08 +08:00
read_raw_ref(): clear *type at start of function
This is more convenient and less error-prone for callers. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
This commit is contained in:
parent
3a0b6b9aba
commit
fa96ea1b88
@ -1430,6 +1430,7 @@ int read_raw_ref(const char *refname, unsigned char *sha1,
|
||||
int ret = -1;
|
||||
int save_errno;
|
||||
|
||||
*type = 0;
|
||||
strbuf_reset(&sb_path);
|
||||
strbuf_git_path(&sb_path, "%s", refname);
|
||||
path = sb_path.buf;
|
||||
|
Loading…
Reference in New Issue
Block a user