public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce•org>
To: Eyvind Bernhardsen <eyvind-git@orakel•ntnu.no>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: "commit"s without "from" in fast-import
Date: Mon, 17 Mar 2008 23:43:21 -0400	[thread overview]
Message-ID: <20080318034321.GK8410@spearce.org> (raw)
In-Reply-To: <F6F70627-FAE7-43F1-BECC-E70A4A561982@orakel.ntnu.no>

Eyvind Bernhardsen <eyvind-git@orakel•ntnu.no> wrote:
> I have a question about fast-import, specifically a (possibly)  
> unorthodox usage of it by cvs2svn.  Cvs2svn generates "commit"s with  
> no "from" commands; instead, it emits a "merge" from the previous  
> commit on the branch, and then rebuilds the entire state of the tree.
> 
> I've verified that the generated repositories are correct, so I know  
> that it works, and I _think_ that it's equivalent to having "from  
> <mark>" followed by "filedeleteall".

Hehe.  Cute trick.  Never intended for it to be used like that.
The git implementation of git-fast-import behaves as you describe,
but I do not know how bzr-fast-import would handle such a stream.

> What I'm wondering is: is there any reason to modify cvs2svn's output  
> to comply more to the man page's way of doing things, or is this a  
> perfectly valid usage?

In my opinion its an interesting use of the language.  The grammar
does not say that no merge commands are permitted when creating
a branch.  It wasn't what I intended, and is really a gap in the
grammar specification.  I'd prefer well known frontends use a
more conventional structure, just in case something were to ever
change about the implementation details of a given importer and
this command set break.  But that's just me.

Maybe we should make this more formalized in the documentation as
allowable, so if it does break for an importer the importer author
has to fix git-fast-import, bzr-fast-import, *-fast-import instead.

-- 
Shawn.

  reply	other threads:[~2008-03-18  3:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 22:10 "commit"s without "from" in fast-import Eyvind Bernhardsen
2008-03-18  3:43 ` Shawn O. Pearce [this message]
     [not found]   ` <F4486D8E-3256-4FA7-89A7-3EC7E7D64162@orakel.ntnu.no>
2008-03-19  2:06     ` Shawn O. Pearce
2008-03-19 18:39       ` James Westby
     [not found]       ` <9A41E5AD-2305-457B-A214-7A11A1B559F6@orakel.ntnu.no>
2008-03-20  3:40         ` [PATCH] fast-import: Document the effect of "merge" with no "from" in a commit Shawn O. Pearce
     [not found]           ` <6FC571BB-D304-4D25-B1F2-1E03BD5438F8@orakel.ntnu.no>
2008-03-21 13:57             ` Eyvind Bernhardsen
2008-03-21 15:25               ` [PATCH v2] " Eyvind Bernhardsen
2008-03-23  5:00                 ` Shawn O. Pearce
2008-03-23  6:17                   ` 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=20080318034321.GK8410@spearce.org \
    --to=spearce@spearce$(echo .)org \
    --cc=eyvind-git@orakel$(echo .)ntnu.no \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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