Re: [PATCH 07/18] revert: Eliminate global "commit" variable
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 27, 2011, 04:43 UTC
- Message-ID
- <20110727044341.GE18470@elie>
- In-Reply-To
- <1311736755-24205-8-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
Show 13 quoted lines
> 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).