git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>, spearce@spearce.org
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add 'git fast-export', the sister of 'git fast-import'
Date: Tue, 27 Nov 2007 12:14:07 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711271212360.27959@racer.site> (raw)
In-Reply-To: <7vsl2sgadf.fsf@gitster.siamese.dyndns.org>

Hi,

[Shawn Cc'ed, since it affects fast-import]

On Mon, 26 Nov 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Sun, 25 Nov 2007, Junio C Hamano wrote:
> >
> >> I am not sure if abort should be the default.
> >
> > I tried to be conservative.
> >
> >> If a straight dump-restore is made without rewriting, the result will 
> >> be identical to the original, right?
> >
> > Yep.
> > ...
> > I agree that for most serious operations sed is not good enough.
> 
> My comment was more about the perception from a new user (not a "new git
> user", but a "new fast-export and fast-import user").
> 
> When you see a command pair foo-export and foo-import, and it is
> advertised that you can pipe them together, a new user would first try a
> straight dump-restore, and would see the warning even though he did not
> do any editing on the stream.
> 
> 	Huh?  Why does a tag signature become invalid because of merely
> 	exporting and then importing?  What is this warning about?

Okay, I did not see that.

> You would explain "yeah in your trial run you did not edit but the
> command pair is to allow you editing the contents in between, and if you
> do that, the object names might change.".
> 
> If the default were "straight copy", then the user will not get an
> invalid signature on his trial run, but will get an invalid signature
> when he rewrites the object stream.  You would get a message on the list
> like this:
> 
> 	Hello, I tried fast-export piped to fast-import so that I can
> 	rewrite my repository, but I am getting invalid signature on
> 	signed tags.  It does not seem to happen if I do not edit but
> 	just use the fast-export output without modification.  What am I
> 	doing wrong?
> 
> And that is the time the explanation first becomes useful.  IOW, you are
> warning at the wrong place.  "It may or may not corrupt the signature, I
> do not know.  Because it depends on what you are going to do with my
> output, I cannot know.  I am warning you anyway to cover my backside".
> 
> I am wondering if fast-import input syntax can be extended to allow
> checking inconsistencies.  A command to import a tag could take an
> additional object name and tell it to warn if the name of the tagged
> object (the one sent with "from:%d\n" part) is different from that
> object name.  At that point, you know the object was rewritten and the
> signature is invalid, and the choice of warning, stripping or aborting
> becomes a useful thing to have.

Why not check by default?  Whenever there is a tag message containing the 
magic BEGIN line, it should check and at least warn if it does not 
match...

Ciao,
Dscho

  reply	other threads:[~2007-11-27 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-25 21:37 [PATCH] Add 'git fast-export', the sister of 'git fast-import' Johannes Schindelin
2007-11-26  1:16 ` Junio C Hamano
2007-11-26 12:39   ` Johannes Schindelin
2007-11-26 17:55     ` Junio C Hamano
2007-11-27 12:14       ` Johannes Schindelin [this message]
2007-11-27  2:08 ` Shawn O. Pearce
2007-11-27 11:31   ` Johannes Schindelin
2007-11-27 23:40     ` Jakub Narebski
2007-11-28 12:22       ` Johannes Schindelin
2007-11-28 12:56         ` Jakub Narebski

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=Pine.LNX.4.64.0711271212360.27959@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.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).