git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Axel Beckert <abe@debian.org>, git@vger.kernel.org
Subject: Re: git: "git stash" changes owners and permissions
Date: Wed, 06 Apr 2011 14:48:08 -0700	[thread overview]
Message-ID: <7voc4jgig7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110406205212.GC1922@elie> (Jonathan Nieder's message of "Wed, 6 Apr 2011 15:52:12 -0500")

Jonathan Nieder <jrnieder@gmail.com> writes:

> ...
> As mentioned before, I don't advise using git to deploy changed files.
> It will change them in the wrong order and creates windows when they're
> not present.  Perhaps a procedure like the following can work?
>
> 	cd /root; (umask 077 && mkdir tmp); cd tmp
> 	git clone /etc/interesting-subdir
>...
> 	# deploy.
> 	rsync -a --exclude='.git' /root/tmp/interesting-subdir/ .
> 	git reset jrn/proposed
> 	git diff;	# should show no changes.


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.

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.

  reply	other threads:[~2011-04-06 21:48 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 [this message]
2011-04-06 22:12         ` Jonathan Nieder

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=7voc4jgig7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=abe@debian.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@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).