From: Junio C Hamano Date: Tue, 21 Jun 2011 19:23:48 GMT Subject: Re: [PATCH 05/13] revert: Eliminate global "commit" variable Message-ID: <7vei2n7zuj.fsf@alter.siamese.dyndns.org> In-Reply-To: <1308661489-20080-6-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra writes: > Since we want to develop the functionality to either pick or revert > individual commits atomically later in the series, make "commit" a > local variable. Doing this involves changing several functions to > take an additional argument, but no other functional changes. Actually you didn't make it a local variable. You made it a parameter to be passed around, which is even better ;-). > -static void write_cherry_pick_head(void) > +static void write_cherry_pick_head(const char *commit_sha1_hex) Wouldn't we prefer to see this parameter also to be a commit objet, not a preformatted hex string? The only exception would be if you are going to introduce a future callsite that does not have a commit object but may know the commit object name, but if you are not going to do so, then...