git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] sequencer: remove pointless rollback_lock_file()

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2023, 14:51 UTC
Message-ID
<xmqq8rfm5hk7.fsf@gitster.g>
In-Reply-To
<20230323162235.995529-1-oswald.buddenhagen@gmx.de>
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:
> The file is gone even if commit_lock_file() fails.
Good spotting.  

I glanced over hits from "git grep -A6 commit_lock_file \*.c" to see if there is a similar mistake, but this seems to be the only one.

Will queue.  Thanks.
Show 16 quoted lines
> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
> ---
>  sequencer.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 3be23d7ca2..2da9b9f890 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3676,7 +3676,6 @@ static int safe_append(const char *filename, const char *fmt, ...)
>  	}
>  	if (commit_lock_file(&lock) < 0) {
>  		strbuf_release(&buf);
> -		rollback_lock_file(&lock);
>  		return error(_("failed to finalize '%s'"), filename);
>  	}
Previous: Oswald Buddenhagen
Message 2 of 2 in “sequencer: remove pointless rollback_lock_file()”
  1. sequencer: remove pointless rollback_lock_file()Oswald Buddenhagen, Mar 23, 2023
  2. Junio C HamanoMar 24, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.