git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@ucw.cz>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH 0/4] Pulling refs files
Date: Tue, 17 May 2005 23:45:33 +0200	[thread overview]
Message-ID: <20050517214533.GP7136@pasky.ji.cz> (raw)
In-Reply-To: <Pine.LNX.4.21.0505171645130.30848-100000@iabervon.org>

Dear diary, on Tue, May 17, 2005 at 11:20:54PM CEST, I got a letter
where Daniel Barkalow <barkalow@iabervon.org> told me that...
> On Tue, 17 May 2005, Petr Baudis wrote:
> > Anything that gets eventually wound up in the info/ directory. (The name
> > of the ignore file saved in info/ignore is the current hit.)
> 
> Hmm... maybe the right thing is to make the implementation-provided
> transfer code handle arbitrary things in GIT_DIR, but have code for
> updating reference files atomically and using a reference file to start
> from use "refs/"? Certainly, there's nothing special about reference files
> in transit.
> 
> Certainly the things in the info/ directory shouldn't be treated a head
> that you're going to pull, so that has to be different above the protocol
> level anyway.

*confused* :) I'm sorry, I have trouble understanding this. Could you
rephrase, please?

> > Well, it'd be again nice to have some generic mechanism for this so that
> > the user could theoretically push over rsync too or something (although
> > that'll be even more racy, it is fine for single-user repository).
> 
> Hmm; I'm not sure what would be good for interfacing with rsync.

I've been thinking about writing some FTP-like client for rsync, where
you could "interactively" tell it what files to download etc.

> > I think the remote file to write the value inside should be porcelain
> > business.
> 
> Certainly it's porcelain business what remote file to write; but I think
> it has to be core business doing the lock, test, and update. I think it
> would be inconvenient to go back to the porcelain layer in the middle of
> the operation, particularly since it would have to go back to the core,
> which is what has the connection to the remote host.

Of course. The porcelain file would just provide the filename.

> > What you should always check though is that before the pull
> > (and after the locking) the value in that file is the same as the "push
> > base". This way you make sure that you are still following a single
> > branch and in case of multiuser repositories that you were fully merged
> > before pushing.
> 
> So the remote receiver should get an instruction: change X from OLD to NEW
> and pull NEW. It should:
> 
>  - lock the file against further updates
>  - check that the current value is the provided OLD
>  - pull the necessary objects
>  - write NEW to the file
- unlock the file ;-))
>  - report success
> 
> On failure of any step, it should unlock the file without changing it.

Sounds right.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

  reply	other threads:[~2005-05-17 21:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-13  6:49 [PATCH 0/4] Pulling refs files Daniel Barkalow
2005-05-13  6:53 ` [PATCH 1/4] Support for refs directory Daniel Barkalow
2005-05-13  6:56 ` [PATCH 2/4] Generic support for pulling refs Daniel Barkalow
2005-05-13  6:57 ` [PATCH 3/4] Pull refs by HTTP Daniel Barkalow
2005-05-13 11:15   ` Edgar Toernig
2005-05-13  7:01 ` [PATCH 4/4] Pulling refs by ssh Daniel Barkalow
2005-05-13 18:59   ` H. Peter Anvin
2005-05-15 15:48     ` Daniel Barkalow
2005-05-13 22:19 ` [PATCH 0/4] Pulling refs files Petr Baudis
2005-05-13 23:14   ` Daniel Barkalow
2005-05-13 23:37     ` Petr Baudis
2005-05-15  3:23       ` Daniel Barkalow
2005-05-17 20:14         ` Petr Baudis
2005-05-17 21:20           ` Daniel Barkalow
2005-05-17 21:45             ` Petr Baudis [this message]
2005-05-17 22:20               ` Daniel Barkalow
2005-05-18 21:35                 ` Petr Baudis
2005-05-19  3:19                 ` Daniel Barkalow
2005-05-19  6:52                   ` Petr Baudis
2005-05-19 16:00                     ` Daniel Barkalow
2005-05-15  5:33 ` Junio C Hamano
2005-05-15 15:40   ` Daniel Barkalow
2005-05-16  7:55     ` 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=20050517214533.GP7136@pasky.ji.cz \
    --to=pasky@ucw.cz \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 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 NNTP newsgroup(s).