Skip to contentSkip to conversation

sequencer: remove duplicate rollback_lock_file() call

PATCH In review Elijah Newren via GitGitGadget 4 participants 4 messages Oct 21, 2020 – Oct 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sequencer: remove duplicate rollback_lock_file() call

From: Elijah Newren <[email protected]>

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.

---
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(-)
sequencer.c +0 -1
index 00acb12496..baff51035e 100644
@@ -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 */

base-commit: 69986e19ffcfb9af674ae5180689ab7bbf92ed28

Signature · 1 line
gitgitgadget
Reviewed-by on v1 1/1
#1 lore raw

Hi Elijah,

sequencer.c static int do_merge(struct repository *r, · line 3692

Quoted 9 lines · Elijah Newren via GitGitGadget
sequencer.c +0 -1
index 00acb12496..baff51035e 100644
@@ -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.

Thanks,
Taylor

#2 lore raw
Quoted 11 lines · Taylor Blau

Hi Elijah,

Quoted 8 lines · Elijah Newren via GitGitGadget
sequencer.c +0 -0
index 00acb12496..baff51035e 100644
@@ -3689,7 +3689,6 @@ static int do_merge(struct repository *r,
 				NULL, 0);
 		rollback_lock_file(&lock);
 
Quoted 8 lines

sequencer.c static int do_merge(struct repository *r, · line 3692

Quoted 1 line
sequencer.c +0 -1
-		rollback_lock_file(&lock);

Looks obviously good to me, thanks.

Thanks,
Taylor

Thanks, both. That's an embarrassing one.

#3 lore raw
In reply to Elijah Newren via GitGitGadget

Hi Elijah,

Quoted 6 lines · Elijah Newren via GitGitGadget

From: Elijah Newren <[email protected]>

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