From: Jonathan Nieder Date: Sun, 06 Nov 2011 00:15:38 GMT Subject: Re: [PATCH 2/5] sequencer: remove CHERRY_PICK_HEAD with sequencer state Message-ID: <20111106001538.GD27272@elie.hsd1.il.comcast.net> In-Reply-To: <1320510586-3940-3-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra wrote: > Make remove_sequencer_state() remove '.git/CHERRY_PICK_HEAD' when > invoked aggressively, since we want to treat it as part of the > sequencer state now. While at it, make some minor improvements to the > function. What does it mean to invoke a function aggressively? What is the nature of these minor improvements (are they behavior changes or just cleanups)? (Remember, the reader hasn't seen the patch yet.) > --- a/sequencer.c > +++ b/sequencer.c > @@ -25,17 +25,22 @@ static char *get_encoding(const char *message); > > void remove_sequencer_state(int aggressive) > { > + const char *seq_dir = git_path(SEQ_DIR); > + const char *seq_old_dir = git_path(SEQ_OLD_DIR); > + const char *cherry_pick_head = git_path("CHERRY_PICK_HEAD"); If there were just two more like this, the behavior would change completely. Scary. Are these temporary variables needed?