Re: [PATCH 4/5] Make sequencer abort safer

2016-12-09 Thread Junio C Hamano
Stephan Beyer writes: > However: > >> -static void update_curr_file() >> +static void update_current_file(void) > > This function name could lead to the impression that there is some > current file (defined by a global state or whatever) that is updated. > > So I'd rather rename the *file* to one

Re: [PATCH 4/5] Make sequencer abort safer

2016-12-08 Thread Stephan Beyer
Hi, I'm a little afraid of feeding Parkinson's law of triviality here, but... ;) On 12/08/2016 06:27 PM, Junio C Hamano wrote: > Johannes Schindelin writes: > >> On Wed, 7 Dec 2016, Stephan Beyer wrote: >> >>> diff --git a/sequencer.c b/sequencer.c >>> index 30b10ba14..c9b560ac1 100644 >>> ---

Re: [PATCH 4/5] Make sequencer abort safer

2016-12-08 Thread Junio C Hamano
Johannes Schindelin writes: > On Wed, 7 Dec 2016, Stephan Beyer wrote: > >> diff --git a/sequencer.c b/sequencer.c >> index 30b10ba14..c9b560ac1 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -27,6 +27,7 @@ GIT_PATH_FUNC(git_path_seq_dir, "sequencer") >> static GIT_PATH_FUNC(git_path_tod

Re: [PATCH 4/5] Make sequencer abort safer

2016-12-08 Thread Johannes Schindelin
Hi, On Wed, 7 Dec 2016, Stephan Beyer wrote: > diff --git a/sequencer.c b/sequencer.c > index 30b10ba14..c9b560ac1 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -27,6 +27,7 @@ GIT_PATH_FUNC(git_path_seq_dir, "sequencer") > static GIT_PATH_FUNC(git_path_todo_file, "sequencer/todo") > stati

[PATCH 4/5] Make sequencer abort safer

2016-12-07 Thread Stephan Beyer
In contrast to "git am --abort", a sequencer abort did not check whether the current HEAD is the one that is expected. This can lead to loss of work (when not spotted and resolved using reflog before the garbage collector chimes in). This behavior is now changed by mimicking "git am --abort": the