git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Daniel Barkalow <barkalow@iabervon.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH 0/4] Pulling refs files
Date: Thu, 19 May 2005 12:00:43 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.21.0505191147480.30848-100000@iabervon.org> (raw)
In-Reply-To: <20050519065207.GB18281@pasky.ji.cz>

On Thu, 19 May 2005, Petr Baudis wrote:

> Dear diary, on Thu, May 19, 2005 at 05:19:01AM CEST, I got a letter
> where Daniel Barkalow <barkalow@iabervon.org> told me that...
> >  2) fetching reference files by name, and making them available to the
> >     local program without writing them to disk at all.
> >  3) fetching other files by name and writing them to either the
> >     corresponding filename or a provided replacement.
> > 
> > I had thought that (2) could be done as a special case of (3), but I think
> > that it has to be separate, because (2) just returns the value, while
> > (3) can't just return the contents, but has to write it somewhere, since
> > it isn't constrained to be exactly 20 bytes.
> 
> Huh. How would (2) be useful and why can't you just still write it e.g.
> to some user-supplied temporary file? I think that'd be still actually
> much less trouble for the scripts to handle.

(2) is what is needed if the user just requests downloading objects
starting with a reference stored remotely, and doesn't request that the
reference be written anywhere. It is also useful because the system wants
to verify that it has actually downloaded the objects successfully before
writing the reference.

Note that the scripts see a higher-level interface; these are the
operations that (e.g.) http-pull.c has to provide for pull.c, which builds
a larger operation (determine the target hash, download the objects, write
the specified ref file) out of them. It would be inconvenient for pull.c 
to download to a temporary file and then read the temporary file, which
shouldn't normally be visible yet, to figure out what it's doing. It wants
to have a function that takes a string and returns a hash, getting the
value from the remote host, and it's inconvenient to deal with the disk in
the middle.

	-Daniel
*This .sig left intentionally blank*


  reply	other threads:[~2005-05-19 16:00 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
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 [this message]
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

  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=Pine.LNX.4.21.0505191147480.30848-100000@iabervon.org \
    --to=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --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.
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).