Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  Protect peel_ref fallback case from NULL parse_object result
  Ensure 'make dist' compiles git-archive.exe on Cygwin
  • Loading branch information
Junio C Hamano committed Feb 24, 2008
2 parents e854864 + 8c87dc7 commit dc31cd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ git.spec: git.spec.in
mv $@+ $@

GIT_TARNAME=git-$(GIT_VERSION)
dist: git.spec git-archive configure
dist: git.spec git-archive$(X) configure
./git-archive --format=tar \
--prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
@mkdir -p $(GIT_TARNAME)
Expand Down
2 changes: 1 addition & 1 deletion refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dc31cd8

Please sign in to comment.