From f2dc849e9c5fe363ad089f6c3f2b7b3d79fd6a6f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 2 Dec 2007 14:14:13 +0000 Subject: Add 'git fast-export', the sister of 'git fast-import' This program dumps (parts of) a git repository in the format that fast-import understands. For clarity's sake, it does not use the 'inline' method of specifying blobs in the commits, but builds the blobs before building the commits. Since signed tags' signatures will not necessarily be valid (think transformations after the export, or excluding revisions, changing the history), there are 4 modes to handle them: abort (default), ignore, warn and strip. The latter just turns the tags into unsigned ones. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/git-fast-export.txt (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt new file mode 100644 index 0000000000..073ff7f123 --- /dev/null +++ b/Documentation/git-fast-export.txt @@ -0,0 +1,83 @@ +git-fast-export(1) +================== + +NAME +---- +git-fast-export - Git data exporter + + +SYNOPSIS +-------- +'git-fast-export [options]' | 'git-fast-import' + +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=:: + Insert 'progress' statements every 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. + + +EXAMPLES +-------- + +------------------------------------------------------------------- +$ git fast-export --all | (cd /empty/repository && git fast-import) +------------------------------------------------------------------- + +This will export the whole repository and import it into the existing +empty repository. Except for reencoding commits that are not in +UTF-8, it would be a one-to-one mirror. + +----------------------------------------------------- +$ git fast-export master~5..master | + sed "s|refs/heads/master|refs/heads/other|" | + git fast-import +----------------------------------------------------- + +This makes a new branch called 'other' from 'master~5..master' +(i.e. if 'master' has linear history, it will take the last 5 commits). + +Note that this assumes that none of the blobs and commit messages +referenced by that revision range contains the string +'refs/heads/master'. + + +Limitations +----------- + +Since gitlink:git-fast-import[1] cannot tag trees, you will not be +able to export the linux-2.6.git repository completely, as it contains +a tag referencing a tree instead of a commit. + + +Author +------ +Written by Johannes E. Schindelin . + +Documentation +-------------- +Documentation by Johannes E. Schindelin . + +GIT +--- +Part of the gitlink:git[7] suite -- cgit v1.2.3 From ee4bc3715fd8e4598d31dfa7288609cad86a2321 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 3 Dec 2007 22:44:39 +0000 Subject: fast-export: rename the signed tag mode 'ignore' to 'verbatim' The name 'verbatim' describes much better what this mode does with signed tags. While at it, fix the documentation what it actually does. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 073ff7f123..fd3d571464 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -26,14 +26,14 @@ OPTIONS Insert 'progress' statements every objects, to be shown by gitlink:git-fast-import[1] during import. ---signed-tags=(ignore|warn|strip|abort):: +--signed-tags=(verbatim|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) +unsigned, with 'verbatim', they will be silently exported and with 'warn', they will be exported, but you will see a warning. -- cgit v1.2.3 From 5162e69732d13dd079919a389a6ace8878aad716 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2007 00:20:38 -0600 Subject: Documentation: rename gitlink macro to linkgit Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P\w(\w|-)*?):(?P\S*?)(\[(?P.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P(http|https|ftp|file|mailto|callto|image|link)):(?P\S*?)(\[(?P.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index fd3d571464..6dac475a0b 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -13,18 +13,18 @@ SYNOPSIS DESCRIPTION ----------- This program dumps the given revisions in a form suitable to be piped -into gitlink:git-fast-import[1]. +into linkgit: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]. +linkgit:git-bundle[1]), or as a kind of an interactive +linkgit:git-filter-branch[1]. OPTIONS ------- --progress=:: Insert 'progress' statements every objects, to be shown by - gitlink:git-fast-import[1] during import. + linkgit:git-fast-import[1] during import. --signed-tags=(verbatim|warn|strip|abort):: Specify how to handle signed tags. Since any transformation @@ -65,7 +65,7 @@ referenced by that revision range contains the string Limitations ----------- -Since gitlink:git-fast-import[1] cannot tag trees, you will not be +Since linkgit:git-fast-import[1] cannot tag trees, you will not be able to export the linux-2.6.git repository completely, as it contains a tag referencing a tree instead of a commit. @@ -80,4 +80,4 @@ Documentation by Johannes E. Schindelin . GIT --- -Part of the gitlink:git[7] suite +Part of the linkgit:git[7] suite -- cgit v1.2.3 From 9e1f0a85c68323830ea117092c55192b17aa3ac8 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 6 Jun 2008 09:07:32 +0200 Subject: documentation: move git(7) to git(1) As the "git" man page describes the "git" command at the end-user level, it seems better to move it to man section 1. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 6dac475a0b..332346cc5d 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -80,4 +80,4 @@ Documentation by Johannes E. Schindelin . GIT --- -Part of the linkgit:git[7] suite +Part of the linkgit:git[1] suite -- cgit v1.2.3 From df6a7ff7ac55d320afa1b8a59393122d6ca0f6c4 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Wed, 11 Jun 2008 13:17:04 +0200 Subject: builtin-fast-export: Add importing and exporting of revision marks This adds the --import-marks and --export-marks to fast-export. These import and export the marks used to for all revisions exported in a similar fashion to what fast-import does. The format is the same as fast-import, so you can create a bidirectional importer / exporter by using the same marks file on both sides. Signed-off-by: Pieter de Bie Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 332346cc5d..277a547a02 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -36,6 +36,26 @@ when encountering a signed tag. With 'strip', the tags will be made unsigned, with 'verbatim', they will be silently exported and with 'warn', they will be exported, but you will see a warning. +--export-marks=:: + Dumps the internal marks table to when complete. + Marks are written one per line as `:markid SHA-1`. Only marks + for revisions are dumped; marks for blobs are ignored. + Backends can use this file to validate imports after they + have been completed, or to save the marks table across + incremental runs. As is only opened and truncated + at completion, the same path can also be safely given to + \--import-marks. + +--import-marks=:: + Before processing any input, load the marks specified in + . The input file must exist, must be readable, and + must use the same format as produced by \--export-marks. ++ +Any commits that have already been marked will not be exported again. +If the backend uses a similar \--import-marks file, this allows for +incremental bidirectional exporting of the repository by keeping the +marks the same across runs. + EXAMPLES -------- -- cgit v1.2.3 From b1889c36d85514e5e70462294c561a02c2edfe2b Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 01:09:04 -0500 Subject: Documentation: be consistent about "git-" versus "git " Since the git-* commands are not installed in $(bindir), using "git-command " in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 277a547a02..b21cd77505 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -8,7 +8,7 @@ git-fast-export - Git data exporter SYNOPSIS -------- -'git-fast-export [options]' | 'git-fast-import' +'git fast-export [options]' | 'git fast-import' DESCRIPTION ----------- -- cgit v1.2.3 From 483bc4f045881b998512ae814d6cf44d0c0cb493 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 13:56:34 -0500 Subject: Documentation formatting and cleanup Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index b21cd77505..dbc2b190ed 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -13,18 +13,18 @@ SYNOPSIS DESCRIPTION ----------- This program dumps the given revisions in a form suitable to be piped -into linkgit:git-fast-import[1]. +into `git-fast-import`. You can use it as a human readable bundle replacement (see linkgit:git-bundle[1]), or as a kind of an interactive -linkgit:git-filter-branch[1]. +`git-filter-branch`. OPTIONS ------- --progress=:: Insert 'progress' statements every objects, to be shown by - linkgit:git-fast-import[1] during import. + `git-fast-import` during import. --signed-tags=(verbatim|warn|strip|abort):: Specify how to handle signed tags. Since any transformation @@ -85,7 +85,7 @@ referenced by that revision range contains the string Limitations ----------- -Since linkgit:git-fast-import[1] cannot tag trees, you will not be +Since `git-fast-import` cannot tag trees, you will not be able to export the linux-2.6.git repository completely, as it contains a tag referencing a tree instead of a commit. -- cgit v1.2.3 From ba020ef5eb5fca3d757bd580ff117adaf81ca079 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 3 Jul 2008 00:41:41 -0500 Subject: manpages: italicize git command names (which were in teletype font) The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index dbc2b190ed..4956964d85 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -13,18 +13,18 @@ SYNOPSIS DESCRIPTION ----------- This program dumps the given revisions in a form suitable to be piped -into `git-fast-import`. +into 'git-fast-import'. You can use it as a human readable bundle replacement (see linkgit:git-bundle[1]), or as a kind of an interactive -`git-filter-branch`. +'git-filter-branch'. OPTIONS ------- --progress=:: Insert 'progress' statements every objects, to be shown by - `git-fast-import` during import. + 'git-fast-import' during import. --signed-tags=(verbatim|warn|strip|abort):: Specify how to handle signed tags. Since any transformation @@ -85,7 +85,7 @@ referenced by that revision range contains the string Limitations ----------- -Since `git-fast-import` cannot tag trees, you will not be +Since 'git-fast-import' cannot tag trees, you will not be able to export the linux-2.6.git repository completely, as it contains a tag referencing a tree instead of a commit. -- cgit v1.2.3 From ae7c5dcef92d46cfc8987fde2c264614fe475bd1 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 27 Jul 2008 00:52:54 +0400 Subject: Support copy and rename detection in fast-export. Although it does not matter for Git itself, tools that export to systems that explicitly track copies and renames can benefit from such information. This patch makes fast-export output correct action logs when -M or -C are enabled. Signed-off-by: Alexander Gavrilov Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 4956964d85..b974e2115b 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -36,6 +36,15 @@ when encountering a signed tag. With 'strip', the tags will be made unsigned, with 'verbatim', they will be silently exported and with 'warn', they will be exported, but you will see a warning. +-M:: +-C:: + Perform move and/or copy detection, as described in the + linkgit:git-diff[1] manual page, and use it to generate + rename and copy commands in the output dump. ++ +Note that earlier versions of this command did not complain and +produced incorrect results if you gave these options. + --export-marks=:: Dumps the internal marks table to when complete. Marks are written one per line as `:markid SHA-1`. Only marks -- cgit v1.2.3 From 29b802aae6213d02879d21aabac1a8d2e035b583 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 9 Dec 2008 07:23:51 +0100 Subject: Improve language in git-merge.txt and related docs Improve some minor language and format issues like hyphenation, phrases, spacing, word order, comma, attributes. Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index b974e2115b..99a1c3158d 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -15,7 +15,7 @@ DESCRIPTION This program dumps the given revisions in a form suitable to be piped into 'git-fast-import'. -You can use it as a human readable bundle replacement (see +You can use it as a human-readable bundle replacement (see linkgit:git-bundle[1]), or as a kind of an interactive 'git-filter-branch'. -- cgit v1.2.3 From 4e46a8d62c551e11e21bd04e059e9ae3cdcfd029 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 20 Dec 2008 01:00:27 +0100 Subject: fast-export: deal with tag objects that do not have a tagger When no tagger was found (old Git produced tags like this), no "tagger" line is printed (but this is incompatible with the current git fast-import). Alternatively, you can pass the option --fake-missing-tagger, forcing fast-export to fake a tagger Unspecified Tagger with a tag date of the beginning of (Unix) time in the case of a missing tagger, so that fast-import is still able to import the result. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-fast-export.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/git-fast-export.txt') diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index b974e2115b..539decbeb2 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -65,6 +65,12 @@ If the backend uses a similar \--import-marks file, this allows for incremental bidirectional exporting of the repository by keeping the marks the same across runs. +--fake-missing-tagger:: + Some old repositories have tags without a tagger. The + fast-import protocol was pretty strict about that, and did not + allow that. So fake a tagger to be able to fast-import the + output. + EXAMPLES -------- -- cgit v1.2.3