Re: [PATCH 1/4] "log" and friends: --children option
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 3, 2008, 19:58 UTC
- Message-ID
- <alpine.LSU.1.00.0804032158040.4008@racer.site>
- In-Reply-To
- <7vlk3v2tg9.fsf@gitster.siamese.dyndns.org>
Hi,
On Thu, 3 Apr 2008, Junio C Hamano wrote:
Show 13 quoted lines
> @@ -1398,6 +1404,26 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
> return left;
> }
>
> +static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child)
> +{
> + struct commit_list *l = xcalloc(1, sizeof(*l));
> +
> + l->item = child;
> + l->next = add_decoration(&revs->children, &parent->object, l);
> +}
> +
> +static void set_children(struct rev_info *revs)I'd call this add_children().
Other than that, nicely done! I did not think it was possible with as few changes.
Ciao, Dscho