From: Jean-Noël Avila via GitGitGadget Date: Tue, 24 Nov 2026 21:48:59 GMT Subject: [PATCH 3/4] doc: convert git-fast-import.adoc to synopsis style Message-ID: In-Reply-To: From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= * convert synopsis section * convert options to `` style * convert __ style Signed-off-by: Jean-Noël Avila --- Documentation/config/fastimport.adoc | 2 +- Documentation/git-fast-import.adoc | 381 ++++++++++++++------------- 2 files changed, 194 insertions(+), 189 deletions(-) diff --git a/Documentation/config/fastimport.adoc b/Documentation/config/fastimport.adoc index 903677d7ef..7b721fa0e9 100644 --- a/Documentation/config/fastimport.adoc +++ b/Documentation/config/fastimport.adoc @@ -1,4 +1,4 @@ -fastimport.unpackLimit:: +`fastimport.unpackLimit`:: If the number of objects imported by linkgit:git-fast-import[1] is below this limit, then the objects will be unpacked into loose object files. However, if the number of imported objects diff --git a/Documentation/git-fast-import.adoc b/Documentation/git-fast-import.adoc index 5201e49334..9a3f83b2b9 100644 --- a/Documentation/git-fast-import.adoc +++ b/Documentation/git-fast-import.adoc @@ -8,15 +8,15 @@ git-fast-import - Backend for fast Git data importers SYNOPSIS -------- -[verse] -'git fast-import' [] +[synopsis] +git fast-import [] DESCRIPTION ----------- This program is usually not what the end user wants to run directly. Most end users want to use one of the existing frontend programs, which parses a specific type of foreign source and feeds the contents -stored there to 'git fast-import'. +stored there to `git fast-import`. fast-import reads a mixed command/data stream from standard input and writes one or more packfiles directly into the current repository. @@ -25,7 +25,7 @@ updated branch and tag refs, fully updating the current repository with the newly imported data. The fast-import backend itself can import into an empty repository (one that -has already been initialized by 'git init') or incrementally +has already been initialized by `git init`) or incrementally update an existing populated repository. Whether or not incremental imports are supported from a particular foreign source depends on the frontend program in use. @@ -35,24 +35,24 @@ the frontend program in use. OPTIONS ------- ---force:: +`--force`:: Force updating modified existing branches, even if doing so would cause commits to be lost (as the new commit does not contain the old commit). ---quiet:: - Disable the output shown by --stats, making fast-import usually +`--quiet`:: + Disable the output shown by `--stats`, making fast-import usually be silent when it is successful. However, if the import stream has directives intended to show user output (e.g. `progress` directives), the corresponding messages will still be shown. ---stats:: +`--stats`:: Display some basic statistics about the objects fast-import has created, the packfiles they were stored into, and the memory used by fast-import during this run. Showing this output - is currently the default, but can be disabled with --quiet. + is currently the default, but can be disabled with `--quiet`. ---allow-unsafe-features:: +`--allow-unsafe-features`:: Many command-line options can be provided as part of the fast-import stream itself by using the `feature` or `option` commands. However, some of these options are unsafe (e.g., @@ -85,43 +85,41 @@ already trusted to run their own code. the default mode is `verbatim`. `--signed-commits=`:: - Specify how to handle signed commits. The following s + Specify how to handle signed commits. The following __s are supported: + -* `verbatim`, which is the default, will silently import commit - signatures. -* `warn-verbatim` will import them, but will display a warning. -* `abort` will make this program die when encountering a signed - commit. -* `strip` will silently make the commits unsigned. -* `warn-strip` will make them unsigned, but will display a warning. -* `strip-if-invalid` will check signatures and, if they are invalid, - will strip them and display a warning. The validation is performed - in the same way as linkgit:git-verify-commit[1] does it. -* `sign-if-invalid[=]`, similar to `strip-if-invalid`, verifies - commit signatures and replaces invalid signatures with newly created ones. - Valid signatures are left unchanged. If `` is provided, that key is - used for signing; otherwise the configured default signing key is used. -* `abort-if-invalid` will make this program die when encountering a signed - commit that is unable to be verified. +`verbatim`;; Silently import commit signatures. This is the default. +`warn-verbatim`;; Import commit signatures, but display a warning. +`abort`;; Die when encountering a signed commit. +`strip`;; Silently make the commits unsigned. +`warn-strip`;; Make the commits unsigned, but display a warning. +`strip-if-invalid`;; Check signatures and, if they are invalid, strip them +and display a warning. Perform the validation in the same way as +linkgit:git-verify-commit[1]. +`sign-if-invalid[=]`;; Verify commit signatures and replace invalid +signatures with newly created ones. Leave valid signatures unchanged. If +__ is provided, use that key for signing; otherwise use the configured +default signing key. +`abort-if-invalid`;; Die when encountering a signed commit that cannot be +verified. Options for Frontends ~~~~~~~~~~~~~~~~~~~~~ ---cat-blob-fd=:: +`--cat-blob-fd=`:: Write responses to `get-mark`, `cat-blob`, and `ls` queries to the - file descriptor instead of `stdout`. Allows `progress` + file descriptor __ instead of `stdout`. Allows `progress` output intended for the end-user to be separated from other output. ---date-format=:: +`--date-format=`:: Specify the type of dates the frontend will supply to fast-import within `author`, `committer` and `tagger` commands. - See ``Date Formats'' below for details about which formats + See the 'Date Formats' section below for details about which formats are supported, and their syntax. ---done:: - Terminate with error if there is no `done` command at the end of +`--done`:: + Terminate with an error if there is no `done` command at the end of the stream. This option might be useful for detecting errors that cause the frontend to terminate before it has started to write a stream. @@ -129,52 +127,52 @@ Options for Frontends Locations of Marks Files ~~~~~~~~~~~~~~~~~~~~~~~~ ---export-marks=:: - Dumps the internal marks table to when complete. +`--export-marks=`:: + Dump the internal marks table to __ when complete. Marks are written one per line as `:markid SHA-1`. Frontends 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 + incremental runs. As __ is only opened and truncated at checkpoint (or completion) the same path can also be - safely given to --import-marks. + 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. +`--import-marks=`:: + Load the marks specified in __ before processing any input. + The input file must exist, must be readable, and + must use the same format as produced by `--export-marks`. Multiple options may be supplied to import more than one set of marks. If a mark is defined to different values, the last file wins. ---import-marks-if-exists=:: - Like --import-marks but instead of erroring out, silently +`--import-marks-if-exists=`:: + Load marks like `--import-marks` but, instead of erroring out, silently skips the file if it does not exist. ---relative-marks:: ---no-relative-marks:: - After specifying --relative-marks the paths specified - with --import-marks= and --export-marks= are relative +`--relative-marks`:: +`--no-relative-marks`:: + Make the paths specified with `--import-marks=` and `--export-marks=` relative to an internal directory in the current repository. - In git-fast-import this means that the paths are relative - to the .git/info/fast-import directory. However, other + In `git-fast-import` this means that the paths are relative + to the `.git/info/fast-import` directory. However, other importers may use a different location. + -Relative and non-relative marks may be combined by interweaving ---(no-)-relative-marks with the --(import|export)-marks= options. +Combine relative and non-relative marks by interweaving +`--(no-)-relative-marks` with the `--(import|export)-marks=` options. Submodule Rewriting ~~~~~~~~~~~~~~~~~~~ ---rewrite-submodules-from=::: ---rewrite-submodules-to=::: - Rewrite the object IDs for the submodule specified by from the values - used in the from to those used in the to . The from marks should + +`--rewrite-submodules-from=:`:: +`--rewrite-submodules-to=:`:: + Rewrite the object IDs for the submodule specified by __ from the values + used in the from __ to those used in the to __. The from marks should have been created by `git fast-export`, and the to marks should have been created by `git fast-import` when importing that same submodule. + - may be any arbitrary string not containing a colon character, but the +__ may be any arbitrary string not containing a colon character, but the same value must be used with both options when specifying corresponding marks. -Multiple submodules may be specified with different values for . It is an +Multiple submodules may be specified with different values for __. It is an error not to use these options in corresponding pairs. + These options are primarily useful when converting a repository from one hash @@ -185,34 +183,34 @@ algorithm. Performance and Compression Tuning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---active-branches=:: - Maximum number of branches to maintain active at once. - See ``Memory Utilization'' below for details. Default is 5. +`--active-branches=`:: + Maintain at most __ branches as active at once. + See the 'Memory Utilization' section below for details. The default is 5. ---big-file-threshold=:: - Maximum size of a blob that fast-import will attempt to +`--big-file-threshold=`:: + Set the maximum size of a blob that fast-import will attempt to create a delta for, expressed in bytes. The default is 512m (512 MiB). Some importers may wish to lower this on systems with constrained memory. ---depth=:: - Maximum delta depth, for blob and tree deltification. +`--depth=`:: + Set the maximum delta depth for blob and tree deltification. Default is 50. ---export-pack-edges=:: - After creating a packfile, print a line of data to - listing the filename of the packfile and the last +`--export-pack-edges=`:: + Print a line of data to + __ listing the filename of the packfile and the last commit on each branch that was written to that packfile. This information may be useful after importing projects whose total object set exceeds the 4 GiB packfile limit, as these commits can be used as edge points during calls - to 'git pack-objects'. + to `git pack-objects`. ---max-pack-size=:: - Maximum size of each output packfile. +`--max-pack-size=`:: + Set the maximum size of each output packfile. The default is unlimited. -fastimport.unpackLimit:: +`fastimport.unpackLimit`:: See linkgit:git-config[1] PERFORMANCE @@ -243,9 +241,9 @@ an ideal situation, given that most conversion tools are throw-away PARALLEL OPERATION ------------------ -Like 'git push' or 'git fetch', imports handled by fast-import are safe to +Like `git push` or `git fetch`, imports handled by fast-import are safe to run alongside parallel `git repack -a -d` or `git gc` invocations, -or any other Git operation (including 'git prune', as loose objects +or any other Git operation (including `git prune`, as loose objects are never used by fast-import). fast-import does not lock the branch or tag refs it is actively importing. @@ -257,8 +255,8 @@ fast-forward update, fast-import will skip updating that ref and instead prints a warning message. fast-import will always attempt to update all branch refs, and does not stop on the first failure. -Branch updates can be forced with --force, but it's recommended that -this only be used on an otherwise quiet repository. Using --force +Branch updates can be forced with `--force`, but it's recommended that +this only be used on an otherwise quiet repository. Using `--force` is not necessary for an initial import into an empty repository. @@ -309,11 +307,11 @@ Date Formats ~~~~~~~~~~~~ The following date formats are supported. A frontend should select the format it will use for this import by passing the format name -in the --date-format= command-line option. +in the `--date-format=` command-line option. `raw`:: This is the Git native format and is `