diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2016-04-22 02:11:17 +0300 |
---|---|---|
committer | Michael Haggerty <mhagger@alum.mit.edu> | 2016-06-13 12:23:49 +0300 |
commit | fa96ea1b883bf83fc488f999c58396bbab1860c1 (patch) | |
tree | c5822ad2a5610bc82fcf8b3b43297831c30a0fe3 | |
parent | 3a0b6b9aba844075e802a6dc4c24622b34ab535b (diff) |
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>
-rw-r--r-- | refs/files-backend.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 1657ce7512..3c99eef42a 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -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; |