aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-24 10:01:19 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-24 10:01:19 -0800
commitdc31cd8fcc20d95a80da5ebe6feaab01539ebe4c (patch)
tree3ae76ea0df2e0028d7ee5ebc032d805597c22978 /refs.c
parente85486450eb0407ad0449d0214b97506d452407f (diff)
parent8c87dc77ae45d7277001b1be2c88ea9062e11d72 (diff)
downloadgit-dc31cd8fcc20d95a80da5ebe6feaab01539ebe4c.tar.gz
git-dc31cd8fcc20d95a80da5ebe6feaab01539ebe4c.tar.xz
Merge branch 'maint'
* maint: Protect peel_ref fallback case from NULL parse_object result Ensure 'make dist' compiles git-archive.exe on Cygwin
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 67d2a502a..fb33da111 100644
--- a/refs.c
+++ b/refs.c
@@ -506,7 +506,7 @@ int peel_ref(const char *ref, unsigned char *sha1)
/* fallback - callers should not call this for unpacked refs */
o = parse_object(base);
- if (o->type == OBJ_TAG) {
+ if (o && o->type == OBJ_TAG) {
o = deref_tag(o, ref, 0);
if (o) {
hashcpy(sha1, o->sha1);