From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Axel Beckert <abe@debian.org>, git@vger.kernel.org
Subject: Re: git: "git stash" changes owners and permissions
Date: Wed, 6 Apr 2011 17:12:05 -0500 [thread overview]
Message-ID: <20110406221205.GB2894@elie> (raw)
In-Reply-To: <7voc4jgig7.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> How does this "rsync" solve "the wrong order" and "creates windows"
> problems? It will update the paths in the order rsync happens to discover
> and there is a wondow between the time the first path is updated and the
> whole directory gets finally in sync.
All true. It's a little better than "git checkout" because rsync
will stage files and then rename them into place rather than leaving
a window with files unlinked[1], but it is not much better.
In fact the rsync was a misleading placeholder. What I really meant
to convey is that this is not something "git checkout" and "git reset
--hard" are designed to do, and that when this much control is needed,
it can be easier to update files out-of-band.
> If you truly want an atomicity, you can make /etc/interesting-subdir a
> symbolic link that points to either interesting-subdir-{0,1}, do the above
> procedure of yours against interesting-subdir-0 (or 1) that is currently
> not pointed by the symbolic link, and when everything in that one is Ok,
> atomically switch the symbolic link to point at it.
True. Though in practice, a little race might be considered ok. :)
Thanks for clarifying.
Jonathan
[1] rsync with --files-from can update files in a specific order,
which might be appropriate in some cases.
prev parent reply other threads:[~2011-04-06 22:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <878vvnfp60.fsf@kiva6.ethz.ch>
[not found] ` <20110406184938.GE1220@elie>
[not found] ` <20110406200640.GF12557@sym.noone.org>
2011-04-06 20:52 ` git: "git stash" changes owners and permissions Jonathan Nieder
2011-04-06 21:48 ` Junio C Hamano
2011-04-06 22:12 ` Jonathan Nieder [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
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=20110406221205.GB2894@elie \
--to=jrnieder@gmail.com \
--cc=abe@debian.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).