diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2016-04-22 01:11:17 +0200 |
---|---|---|
committer | Michael Haggerty <mhagger@alum.mit.edu> | 2016-06-13 11:23:49 +0200 |
commit | fa96ea1b883bf83fc488f999c58396bbab1860c1 (patch) | |
tree | c5822ad2a5610bc82fcf8b3b43297831c30a0fe3 /refs/files-backend.c | |
parent | 3a0b6b9aba844075e802a6dc4c24622b34ab535b (diff) | |
download | git-fa96ea1b883bf83fc488f999c58396bbab1860c1.tar.gz git-fa96ea1b883bf83fc488f999c58396bbab1860c1.tar.xz |
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>
Diffstat (limited to 'refs/files-backend.c')
-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 1657ce751..3c99eef42 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; |