From: Junio C Hamano Date: Mon, 01 Jun 2015 14:56:28 GMT Subject: Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream Message-ID: In-Reply-To: <1433120593-186980-1-git-send-email-sandals@crustytoothpaste.net> "brian m. carlson" writes: > diff --git a/builtin/log.c b/builtin/log.c > index dd8f3fc..e0465ba 100644 > --- a/builtin/log.c > +++ b/builtin/log.c > @@ -807,6 +807,12 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids) > o2 = rev->pending.objects[1].item; > flags2 = o2->flags; > > + o1 = deref_tag(o1, NULL, 0); > + o2 = deref_tag(o2, NULL, 0); > + > + if (!o1 || !o2) > + die(_("Invalid tag.")); Shouldn't you ensure o1 and o2 are commits here?