diff mbox series

sequencer: remove duplicate rollback_lock_file() call

Message ID pull.894.git.git.1603286675709.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 1234e8297f3bfd9101259e5557f1e85cea755e86
Headers show
Series sequencer: remove duplicate rollback_lock_file() call | expand

Commit Message

Elijah Newren Oct. 21, 2020, 1:24 p.m. UTC
From: Elijah Newren <newren@gmail.com>

Commit 2b6ad0f4bc ("rebase --rebase-merges: add support for octopus
merges", 2017-12-21) introduced a case where rollback_lock_file() was
unconditionally called twice in a row with no intervening commands.
Remove the duplicate.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
    sequencer: remove duplicate rollback_lock_file() call

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-894%2Fnewren%2Fremove-duplicate-sequencer-code-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-894/newren/remove-duplicate-sequencer-code-v1
Pull-Request: https://github.com/git/git/pull/894

 sequencer.c | 1 -
 1 file changed, 1 deletion(-)


base-commit: 69986e19ffcfb9af674ae5180689ab7bbf92ed28

Comments

Taylor Blau Oct. 21, 2020, 5:17 p.m. UTC | #1
Hi Elijah,

On Wed, Oct 21, 2020 at 01:24:35PM +0000, Elijah Newren via GitGitGadget wrote:
> diff --git a/sequencer.c b/sequencer.c
> index 00acb12496..baff51035e 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3689,7 +3689,6 @@ static int do_merge(struct repository *r,
>  				NULL, 0);
>  		rollback_lock_file(&lock);
>
> -		rollback_lock_file(&lock);

Looks obviously good to me, thanks.

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks,
Taylor
Junio C Hamano Oct. 21, 2020, 7:55 p.m. UTC | #2
Taylor Blau <me@ttaylorr.com> writes:

> Hi Elijah,
>
> On Wed, Oct 21, 2020 at 01:24:35PM +0000, Elijah Newren via GitGitGadget wrote:
>> diff --git a/sequencer.c b/sequencer.c
>> index 00acb12496..baff51035e 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>> @@ -3689,7 +3689,6 @@ static int do_merge(struct repository *r,
>>  				NULL, 0);
>>  		rollback_lock_file(&lock);
>>
>> -		rollback_lock_file(&lock);
>
> Looks obviously good to me, thanks.
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>
>
> Thanks,
> Taylor

Thanks, both.  That's an embarrassing one.
Johannes Schindelin Oct. 22, 2020, 9:12 a.m. UTC | #3
Hi Elijah,

On Wed, 21 Oct 2020, Elijah Newren via GitGitGadget wrote:

> From: Elijah Newren <newren@gmail.com>
>
> Commit 2b6ad0f4bc ("rebase --rebase-merges: add support for octopus
> merges", 2017-12-21) introduced a case where rollback_lock_file() was
> unconditionally called twice in a row with no intervening commands.
> Remove the duplicate.

Thank you for cleaning up after me. I _know_ that this slipped in a couple
times during my rebasing, and still, this last time it slipped through.

ACK,
Dscho
diff mbox series

Patch

diff --git a/sequencer.c b/sequencer.c
index 00acb12496..baff51035e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3689,7 +3689,6 @@  static int do_merge(struct repository *r,
 				NULL, 0);
 		rollback_lock_file(&lock);
 
-		rollback_lock_file(&lock);
 		ret = run_command(&cmd);
 
 		/* force re-reading of the cache */