From: Clemens Buchacher <drizzd@gmx.net>
To: Edward Thomson <ethomson@edwardthomson.com>
Cc: git@vger.kernel.org, Orgad Shaneh <orgads@gmail.com>
Subject: Re: [PATCH] checkout files in-place
Date: Mon, 11 Jun 2018 22:57:04 +0200 [thread overview]
Message-ID: <20180611205704.GA1399@Sonnenschein.localdomain> (raw)
In-Reply-To: <20180611203541.GA6@606faba9ba17>
+Cc: Orgad Shaneh
On Mon, Jun 11, 2018 at 08:35:41PM +0000, Edward Thomson wrote:
> On Sun, Jun 10, 2018 at 09:44:45PM +0200, Clemens Buchacher wrote:
> >
> > It is safe to do this on Linux file systems, even if open file handles
> > still exist, because unlink only removes the directory reference to the
> > file. On Windows, however, a file cannot be deleted until all handles to
> > it are closed. If a file cannot be deleted, its name cannot be reused.
>
> I'm nervous about this proposed change, since it feels like it's
> addressing an issue that only exists in QT Creator.
>
> You've accurately described the default semantics in Win32. A file
> cannot be deleted until all handles to it are closed, unless it was
> opened with `FILE_SHARE_DELETE` as their sharing mode. This is not the
> default sharing mode in either Win32 or .NET.
>
> However, for your patch to have an effect, all processes with a handle
> open must have specified `FILE_SHARE_WRITE`. This is rather uncommon,
> since it's also not included in the default Win32 or .NET sharing mode.
> This is because it's uncommon that you would want other processes to
> change the data underneath you in between ReadFile() calls.
>
> So your patch will benefit people who have processes that have
> `FILE_SHARE_WRITE` set but not `FILE_SHARE_DELETE` set, which I think is
> generally an uncommon scenario to want to support.
>
> Generally if you're willing to accept files changing underneath you,
> then you probably want to allow them to be deleted, too. So this feels
> like something that's very specific to QT Creator. Or are there other
> IDEs or development tools that use these open semantics that I'm not
> aware of?
I am also not aware of other IDEs which have this issue.
Orgad, you also mentioned FILE_SHARE_DELETE here [*1*]. Does the Qt
Creator issue persist despite this flag? You also just commented on
Github that "Regarding Qt Creator, the issue should be mostly solved by
now in 4.7". So a fix in Git is no longer needed?
[*1*] https://github.com/git-for-windows/git/pull/1666
next prev parent reply other threads:[~2018-06-11 20:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-10 19:44 [PATCH] checkout files in-place Clemens Buchacher
2018-06-11 2:04 ` brian m. carlson
2018-06-11 17:48 ` Clemens Buchacher
2018-06-11 18:02 ` Junio C Hamano
2018-06-11 20:22 ` Clemens Buchacher
2018-06-11 17:59 ` Ævar Arnfjörð Bjarmason
2018-06-11 20:35 ` Edward Thomson
2018-06-11 20:57 ` Clemens Buchacher [this message]
[not found] ` <CAGHpTBJFwToEwnk4P17AJ+z-55Nzc04OBbTvsbFRrkXJpfXAkQ@mail.gmail.com>
2018-06-12 8:51 ` Edward Thomson
2018-06-13 7:39 ` Orgad Shaneh
2018-06-11 20:39 ` [PATCH v2] " Clemens Buchacher
2018-06-11 21:38 ` Ævar Arnfjörð Bjarmason
2018-06-11 22:46 ` 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
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=20180611205704.GA1399@Sonnenschein.localdomain \
--to=drizzd@gmx.net \
--cc=ethomson@edwardthomson.com \
--cc=git@vger.kernel.org \
--cc=orgads@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).