Subject: Re: [PATCH 07/18] revert: Eliminate global "commit" variable

From: Jonathan Nieder <[email-masked]>
Date: Wed, 27 Jul 2011 06:43:41 +0200

Ramkumar Ramachandra wrote:

> Functions which act on commits currently rely on a file-scope static
> variable to be set before they're called.  Consequently, the API and
> corresponding callsites are ugly and unclear.  Remove this variable
> and change their API to accept the commit to act on as additional
> argument so that the callsites change from looking like
>
> commit = prepare_a_commit();
> act_on_commit();
>
> to looking like
>
> commit = prepare_a_commit();
> act_on_commit(commit);

Very sane, and from a cursory look, it seems to be implemented well.

Tiny commit message nit: code, diagrams, and other text for which line
breaks are significant are more easily read when indented so the
reader knows you are not just editing with a funny line width (e.g.,
grepping for : at ends of lines in the pager shown by "git log" should
show some examples).