All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, josharian@gmail.com
Subject: Re: [PATCH] config.c: handle error case for fstat() calls
Date: Tue, 20 Dec 2016 16:47:46 +0700	[thread overview]
Message-ID: <20161220094746.GA3917@ash> (raw)
In-Reply-To: <xmqqtw9zpz0c.fsf@gitster.mtv.corp.google.com>

On Mon, Dec 19, 2016 at 10:14:27AM -0800, Junio C Hamano wrote:
> Shouldn't the error-return path in the second hunk rollback the
> lockfile to clean after itself?  The existing "Oh, we cannot chmod
> to match the original" check that comes immediately after shares the
> same issue, so this is not a new problem, but making an existing one
> worse.

OK. How about two more patches on top (or bottom, does not matter)?
The second one should fix this. The first is sort of "good to do".

[PATCH 1/2] config.c: rename label unlock_and_out
[PATCH 2/2] config.c: handle lock file in error case in git_config_rename_...
--
Duy

  reply	other threads:[~2016-12-20  9:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 18:41 Segfault in git_config_set_multivar_in_file_gently with direct_io in FUSE filesystem Josh Bleecher Snyder
2016-12-19  9:21 ` [PATCH] config.c: handle error case for fstat() calls Nguyễn Thái Ngọc Duy
2016-12-19 18:14   ` Junio C Hamano
2016-12-20  9:47     ` Duy Nguyen [this message]
2016-12-20  9:48       ` [PATCH 1/2] config.c: rename label unlock_and_out Nguyễn Thái Ngọc Duy
2016-12-20  9:48         ` [PATCH 2/2] config.c: handle lock file in error case in git_config_rename_ Nguyễn Thái Ngọc Duy
2016-12-20 20:09           ` Junio C Hamano

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=20161220094746.GA3917@ash \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=josharian@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.