From: Junio C Hamano <gitster@pobox.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] sequencer: remove pointless rollback_lock_file()
Date: Fri, 24 Mar 2023 07:51:04 -0700 [thread overview]
Message-ID: <xmqq8rfm5hk7.fsf@gitster.g> (raw)
In-Reply-To: <20230323162235.995529-1-oswald.buddenhagen@gmx.de> (Oswald Buddenhagen's message of "Thu, 23 Mar 2023 17:22:35 +0100")
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.
> 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);
> }
prev parent reply other threads:[~2023-03-24 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 16:22 [PATCH] sequencer: remove pointless rollback_lock_file() Oswald Buddenhagen
2023-03-24 14:51 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8rfm5hk7.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=oswald.buddenhagen@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).