Re: [PATCH v2 05/16] blame: accept multiple -L ranges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 6, 2013, 21:33 UTC
- Message-ID
- <7v1u66fqrz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1375797589-65308-6-git-send-email-sunshine@sunshineco.com>
Show 16 quoted lines
> + for (range_i = ranges.nr; range_i > 0; --range_i) {
> + const struct range *r = &ranges.ranges[range_i - 1];
> + long bottom = r->start;
> + long top = r->end;
> + struct blame_entry *next = ent;
> + ent = xcalloc(1, sizeof(*ent));
> + ent->lno = bottom;
> + ent->num_lines = top - bottom;
> + ent->suspect = o;
> + ent->s_lno = bottom;
> + ent->next = next;
> + if (next)
> + next->prev = ent;
> + origin_incref(o);
> + }
> + origin_decref(o);Hmph, I do not see where the need for this decref is coming from. Did we incref once too many somewhere?
Show 5 quoted lines
> + range_set_release(&ranges); > + string_list_clear(&range_list, 0); > > sb.ent = ent; > sb.path = path;