Skip to content

Commit fa232d4

Browse files
committed
Merge branch 'sr/gfi-options'
* sr/gfi-options: fast-import: add (non-)relative-marks feature fast-import: allow for multiple --import-marks= arguments fast-import: test the new option command fast-import: add option command fast-import: add feature command fast-import: put marks reading in its own function fast-import: put option parsing code in separate functions
2 parents 703601d + bc3c79a commit fa232d4

File tree

3 files changed

+462
-86
lines changed

3 files changed

+462
-86
lines changed

Documentation/git-fast-import.txt

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ OPTIONS
7575
set of marks. If a mark is defined to different values,
7676
the last file wins.
7777

78+
--relative-marks::
79+
After specifying --relative-marks= the paths specified
80+
with --import-marks= and --export-marks= are relative
81+
to an internal directory in the current repository.
82+
In git-fast-import this means that the paths are relative
83+
to the .git/info/fast-import directory. However, other
84+
importers may use a different location.
85+
86+
--no-relative-marks::
87+
Negates a previous --relative-marks. Allows for combining
88+
relative and non-relative marks by interweaving
89+
--(no-)-relative-marks= with the --(import|export)-marks=
90+
options.
91+
7892
--export-pack-edges=<file>::
7993
After creating a packfile, print a line of data to
8094
<file> listing the filename of the packfile and the last
@@ -303,6 +317,15 @@ and control the current import process. More detailed discussion
303317
standard output. This command is optional and is not needed
304318
to perform an import.
305319

320+
`feature`::
321+
Require that fast-import supports the specified feature, or
322+
abort if it does not.
323+
324+
`option`::
325+
Specify any of the options listed under OPTIONS that do not
326+
change stream semantic to suit the frontend's needs. This
327+
command is optional and is not needed to perform an import.
328+
306329
`commit`
307330
~~~~~~~~
308331
Create or update a branch with a new commit, recording one logical
@@ -846,6 +869,62 @@ Placing a `progress` command immediately after a `checkpoint` will
846869
inform the reader when the `checkpoint` has been completed and it
847870
can safely access the refs that fast-import updated.
848871

872+
`feature`
873+
~~~~~~~~~
874+
Require that fast-import supports the specified feature, or abort if
875+
it does not.
876+
877+
....
878+
'feature' SP <feature> LF
879+
....
880+
881+
The <feature> part of the command may be any string matching
882+
^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
883+
884+
Feature work identical as their option counterparts with the
885+
exception of the import-marks feature, see below.
886+
887+
The following features are currently supported:
888+
889+
* date-format
890+
* import-marks
891+
* export-marks
892+
* relative-marks
893+
* no-relative-marks
894+
* force
895+
896+
The import-marks behaves differently from when it is specified as
897+
commandline option in that only one "feature import-marks" is allowed
898+
per stream. Also, any --import-marks= specified on the commandline
899+
will override those from the stream (if any).
900+
901+
`option`
902+
~~~~~~~~
903+
Processes the specified option so that git fast-import behaves in a
904+
way that suits the frontend's needs.
905+
Note that options specified by the frontend are overridden by any
906+
options the user may specify to git fast-import itself.
907+
908+
....
909+
'option' SP <option> LF
910+
....
911+
912+
The `<option>` part of the command may contain any of the options
913+
listed in the OPTIONS section that do not change import semantics,
914+
without the leading '--' and is treated in the same way.
915+
916+
Option commands must be the first commands on the input (not counting
917+
feature commands), to give an option command after any non-option
918+
command is an error.
919+
920+
The following commandline options change import semantics and may therefore
921+
not be passed as option:
922+
923+
* date-format
924+
* import-marks
925+
* export-marks
926+
* force
927+
849928
Crash Reports
850929
-------------
851930
If fast-import is supplied invalid input it will terminate with a

0 commit comments

Comments
 (0)