git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: gitgitgadget@gmail.com, git <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Gaël Lhez" <gael.lhez@gmail.com>
Subject: Re: [PATCH v2 1/1] bundle: cleanup lock files on error
Date: Wed, 14 Nov 2018 14:08:48 -0800	[thread overview]
Message-ID: <CAGZ79kZ_wrQ=OdJ6xWbL+F5RDb38YAmzc87o8A=Zb8zBywMJBQ@mail.gmail.com> (raw)
In-Reply-To: <CAN0heSqsjKksKnBHjffVMDEyX4A2DAY6Naw4tbBXEm+AdhOLtA@mail.gmail.com>

On Wed, Nov 14, 2018 at 1:43 PM Martin Ågren <martin.agren@gmail.com> wrote:
>
> On Wed, 14 Nov 2018 at 16:26, Gaël Lhez via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> > However, the `.lock` file was still open and on Windows that means
> > that it could not be deleted properly. This patch fixes that issue.
>
> Hmmm, doesn't the tempfile machinery remove the lock file when we die?

On Windows this seems not to be the case. (Open files cannot be deleted
as the open file is not kept by inode or similar but by the file path there?)

Rewording your concern: Could the tempfile machinery be taught to
work properly on Windows, e.g. by first closing all files and then deleting
them afterwards?

There was a refactoring of tempfiles merged in 89563ec379
(Merge branch 'jk/incore-lockfile-removal', 2017-09-19), which sounded
promising at first, as it is dated after the original patch[1] date
(June 2016), but it has no references for Windows being different,
so we might still have the original issue; most of the lockfile
infrastructure was done in 2015 via db86e61cbb (Merge branch
'mh/tempfile', 2015-08-25)

[1] https://github.com/git-for-windows/git/pull/797

  reply	other threads:[~2018-11-14 22:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 15:09 [PATCH 0/1] bundle: fix issue when bundles would be empty Johannes Schindelin via GitGitGadget
2018-11-13 15:09 ` [PATCH 1/1] bundle: refuse to create empty bundle Gaël Lhez via GitGitGadget
2018-11-13 19:28   ` Stefan Beller
2018-11-13 20:37     ` Gaël Lhez
     [not found]     ` <CAK8L4uiMHrsdwJz9+rD1tSCywL2kHosx-hKZdS=UtZDHLy464A@mail.gmail.com>
2018-11-13 21:11       ` Stefan Beller
2018-11-14 15:23         ` Johannes Schindelin
2018-11-14 15:25 ` [PATCH v2 0/1] bundle: fix issue when bundles would be empty Johannes Schindelin via GitGitGadget
2018-11-14 15:25   ` [PATCH v2 1/1] bundle: cleanup lock files on error Gaël Lhez via GitGitGadget
2018-11-14 21:43     ` Martin Ågren
2018-11-14 22:08       ` Stefan Beller [this message]
2018-11-15  4:34         ` Jeff King
2018-11-15 12:57           ` Johannes Schindelin
2018-11-15 13:37             ` Jeff King
2018-11-15 16:32               ` Johannes Schindelin
2018-11-15 16:43                 ` Jeff King
2018-11-15 20:01                   ` Johannes Schindelin
2018-11-16  9:43                     ` [PATCH] bundle: dup() output descriptor closer to point-of-use Jeff King
2018-11-16 15:06                       ` Johannes Schindelin
2018-11-17  7:05                       ` Junio C Hamano
2018-11-15 16:49             ` [PATCH v2 1/1] bundle: cleanup lock files on error Duy Nguyen

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGZ79kZ_wrQ=OdJ6xWbL+F5RDb38YAmzc87o8A=Zb8zBywMJBQ@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=gael.lhez@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=martin.agren@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).