Re: [PATCH] reflog-walk: don't segfault on non-commit sha1's in the reflog

2015-12-30 Thread Dennis Kaarsemaker
On wo, 2015-12-30 at 13:41 -0800, Junio C Hamano wrote: > Dennis Kaarsemaker writes: > > > On wo, 2015-12-30 at 13:20 -0800, Junio C Hamano wrote: > > > Dennis Kaarsemaker writes: > > > > > > > diff --git a/reflog-walk.c b/reflog-walk.c > > > > index 85b8a54..b85c8e8 100644 > > > > --- a/reflog

Re: [PATCH] reflog-walk: don't segfault on non-commit sha1's in the reflog

2015-12-30 Thread Junio C Hamano
Dennis Kaarsemaker writes: > On wo, 2015-12-30 at 13:20 -0800, Junio C Hamano wrote: >> Dennis Kaarsemaker writes: >> >> > diff --git a/reflog-walk.c b/reflog-walk.c >> > index 85b8a54..b85c8e8 100644 >> > --- a/reflog-walk.c >> > +++ b/reflog-walk.c >> > @@ -236,8 +236,8 @@ void fake_reflog_pa

Re: [PATCH] reflog-walk: don't segfault on non-commit sha1's in the reflog

2015-12-30 Thread Dennis Kaarsemaker
On wo, 2015-12-30 at 13:20 -0800, Junio C Hamano wrote: > Dennis Kaarsemaker writes: > > > diff --git a/reflog-walk.c b/reflog-walk.c > > index 85b8a54..b85c8e8 100644 > > --- a/reflog-walk.c > > +++ b/reflog-walk.c > > @@ -236,8 +236,8 @@ void fake_reflog_parent(struct reflog_walk_info > > *info

Re: [PATCH] reflog-walk: don't segfault on non-commit sha1's in the reflog

2015-12-30 Thread Junio C Hamano
Dennis Kaarsemaker writes: > diff --git a/reflog-walk.c b/reflog-walk.c > index 85b8a54..b85c8e8 100644 > --- a/reflog-walk.c > +++ b/reflog-walk.c > @@ -236,8 +236,8 @@ void fake_reflog_parent(struct reflog_walk_info *info, > struct commit *commit) > reflog = &commit_reflog->reflogs->item

[PATCH] reflog-walk: don't segfault on non-commit sha1's in the reflog

2015-12-30 Thread Dennis Kaarsemaker
Use lookup_commit instead of parse_object to look up commits mentioned in the reflog. This avoids a segfault in save_parents if somehow a sha1 for something other than a commit ends up in the reflog. Signed-off-by: Dennis Kaarsemaker Helped-by: Nguyễn Thái Ngọc Duy --- Duy Nguyen wrote: > I wou