git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: David Barr <david.barr@cordelta.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 2/7] fast-import: Let importers retrieve the objects being written
Date: Tue, 12 Oct 2010 17:38:27 -0500	[thread overview]
Message-ID: <20101012223827.GB15587@burratino> (raw)
In-Reply-To: <1286891424-2067-3-git-send-email-david.barr@cordelta.com>

David Barr wrote:

> The output uses the same format as "git cat-file --batch".

This means:

	<sha1> SP <type> SP <size> LF
	<contents> LF

where <contents> are the raw content of the object in question.

If a person just wants to read the <sha1>, the <contents> are
wasted computation and I/O.  Does that matter?

Suppose some day fast-import gains a feature to respond to requests
out of order.  The response would need to include the name of the
object as requested for the frontend to make any sense of it.  Would
it be worth preparing the format for that now, so the same frontend
code can deal with the format produced by fast-import with and without
that feature?

The format of tags, trees, and commits (though not blobs) is specific
to git: fast-import backends for other version control systems would
not be able to respond in the same way.  So maybe it would make sense
to restrict cat requests to blobs for now.

> Objects can be specified by path within a tree as well, using a
>
>  cat TREE "PATH"
>
> syntax.  With this syntax, also, the tree can only be specified by
> :n marker or 40-digit tree id.

I would prefer

	cat "<path>"

within commit commands, which would spit out the content at that
path in the currently-staged version of the commit, and a separate

	C <tree> "<path>" "<path>"

to copy data from previous commits.  So cat <tree> "<path>" would be
replaced with

	C <tree> "<path>" "dest"
	cat "dest"

when using content from tree:path to prepare dest.  Of course, that
would be less flexible, but I find it more intuitive for svn-fe at
least, perhaps because it fits better with svn's object model.

In either regime, I hear there is some demand for allowing commits to
be used in place of trees.

At any rate, that is not needed for the current version of svn-fe,
is it?  So maybe it would make sense to strip down the patch to just
allow

	cat <blob>

Thanks for resending it.

  reply	other threads:[~2010-10-12 22:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 13:50 [PATCH/RFC] Add support for subversion dump format v3 David Barr
2010-10-12 13:50 ` [PATCH 1/7] Teach fast-import to print the id of each imported commit David Barr
2010-10-12 14:42   ` Sverre Rabbelier
2010-10-12 18:48     ` Jonathan Nieder
2010-10-12 18:57       ` Sverre Rabbelier
2010-10-12 19:07         ` Jonathan Nieder
2010-10-12 22:06   ` Jonathan Nieder
2010-10-12 23:05     ` Sverre Rabbelier
2010-10-12 13:50 ` [PATCH 2/7] fast-import: Let importers retrieve the objects being written David Barr
2010-10-12 22:38   ` Jonathan Nieder [this message]
2010-10-12 23:07     ` Sverre Rabbelier
2010-10-13  0:07       ` Jonathan Nieder
2010-10-13 13:10         ` Sverre Rabbelier
2010-10-12 13:50 ` [PATCH 3/7] fast-import: Allow cat command with empty path David Barr
2010-10-12 22:47   ` Jonathan Nieder
2010-10-12 13:50 ` [PATCH 4/7] fast-import: Allow cat requests at arbitrary points in stream David Barr
2010-10-12 22:50   ` Jonathan Nieder
2010-10-12 13:50 ` [PATCH 5/7] vcs-svn: extend svndump to parse version 3 format David Barr
2010-10-12 22:56   ` Jonathan Nieder
2010-10-12 13:50 ` [PATCH 6/7] vcs-svn: implement prop-delta handling David Barr
2010-10-12 22:59   ` Jonathan Nieder
2010-10-12 13:50 ` [PATCH 7/7] svn-fe: Use the --report-fd feature David Barr
2010-10-12 14:55   ` Sverre Rabbelier
2010-10-12 23:03     ` Jonathan Nieder
2010-10-12 23:11       ` Sverre Rabbelier
2010-10-12 23:36         ` Jonathan Nieder
2010-10-12 23:59   ` Jonathan Nieder
2010-10-13  2:24 ` [PATCH/RFC] Add support for subversion dump format v3 Jonathan Nieder
  -- strict thread matches above, loose matches on Subject: below --
2010-10-12 13:40 David Barr
2010-10-12 13:40 ` [PATCH 2/7] fast-import: Let importers retrieve the objects being written David Barr

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=20101012223827.GB15587@burratino \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=david.barr@cordelta.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    --cc=srabbelier@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).