git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add 'git fast-export', the sister of 'git fast-import'
Date: Sun, 25 Nov 2007 17:16:29 -0800	[thread overview]
Message-ID: <7vbq9hiz6a.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0711252236350.4725@wbgn129.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Sun, 25 Nov 2007 22:37:20 +0100 (CET)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
> new file mode 100644
> index 0000000..073ff7f
> --- /dev/null
> +++ b/Documentation/git-fast-export.txt
> ...
> +DESCRIPTION
> +-----------
> +This program dumps the given revisions in a form suitable to be piped
> +into gitlink:git-fast-import[1].
> +
> +You can use it as a human readable bundle replacement (see
> +gitlink:git-bundle[1]), or as a kind of an interactive
> +gitlink:git-filter-branch[1].
> +
> +
> +OPTIONS
> +-------
> +--progress=<n>::
> +	Insert 'progress' statements every <n> objects, to be shown by
> +	gitlink:git-fast-import[1] during import.
> +
> +--signed-tags=(ignore|warn|strip|abort)::
> +	Specify how to handle signed tags.  Since any transformation
> +	after the export can change the tag names (which can also happen
> +	when excluding revisions) the signatures will not match.
> ++
> +When asking to 'abort' (which is the default), this program will die
> +when encountering a signed tag.  With 'strip', the tags will be made
> +unsigned, with 'ignore', they will be silently ignored (i.e. not exported)
> +and with 'warn', they will be exported, but you will see a warning.

I am not sure if abort should be the default.

If a straight dump-restore is made without rewriting, the result will be
identical to the original, right?

The reason I mention a straight dump-restore is because ...

> +$ git fast-export master~5..master |
> +	sed "s|refs/heads/master|refs/heads/other|" |
> +	git fast-import

... I find this a quite unrealistic example to assume that the data
stream does not have some string and convert blindly without parsing.

On the other hand, we _could_ also have a separate filter that works on
input stream for fast-import, but that filter should know what the
fast-import input stream looks like (a simple sed does not cut it).  

So unless the future direction is to deprecate filter-branch and replace
it with such a fast-import based filter in between fast-export and
fast-import, I think the use of fast-export is to make verbatim copy
without munging the contents, which leads me to think --signed-tag
option should default to "export it as-is".

... which seem to be missing from the available values to the option.

> diff --git a/builtin-fast-export.c b/builtin-fast-export.c
> new file mode 100755
> index 0000000..48d0c54
> --- /dev/null
> +++ b/builtin-fast-export.c
> ...
> +/*
> + * TODO:
> + * - tags (--signed-tags=(ignore|warn|strip|abort)
> + */

This comment is stale?

  reply	other threads:[~2007-11-26  1:16 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 [this message]
2007-11-26 12:39   ` Johannes Schindelin
2007-11-26 17:55     ` Junio C Hamano
2007-11-27 12:14       ` Johannes Schindelin
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=7vbq9hiz6a.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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).