Skip to content

Commit da656f1

Browse files
committed
Merge branch 'maint-1.7.2' into maint-1.7.3
* maint-1.7.2: fast-import: introduce "feature notes" command fast-import: clarify documentation of "feature" command
2 parents 960ac5f + 6a7f71d commit da656f1

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

Documentation/git-fast-import.txt

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -882,28 +882,31 @@ Require that fast-import supports the specified feature, or abort if
882882
it does not.
883883

884884
....
885-
'feature' SP <feature> LF
885+
'feature' SP <feature> ('=' <argument>)? LF
886886
....
887887

888-
The <feature> part of the command may be any string matching
889-
^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
890-
891-
Feature work identical as their option counterparts with the
892-
exception of the import-marks feature, see below.
893-
894-
The following features are currently supported:
895-
896-
* date-format
897-
* import-marks
898-
* export-marks
899-
* relative-marks
900-
* no-relative-marks
901-
* force
902-
903-
The import-marks behaves differently from when it is specified as
904-
commandline option in that only one "feature import-marks" is allowed
905-
per stream. Also, any --import-marks= specified on the commandline
906-
will override those from the stream (if any).
888+
The <feature> part of the command may be any one of the following:
889+
890+
date-format::
891+
export-marks::
892+
relative-marks::
893+
no-relative-marks::
894+
force::
895+
Act as though the corresponding command-line option with
896+
a leading '--' was passed on the command line
897+
(see OPTIONS, above).
898+
899+
import-marks::
900+
Like --import-marks except in two respects: first, only one
901+
"feature import-marks" command is allowed per stream;
902+
second, an --import-marks= command-line option overrides
903+
any "feature import-marks" command in the stream.
904+
905+
notes::
906+
Require that the backend support the 'notemodify' (N)
907+
subcommand to the 'commit' command.
908+
Versions of fast-import not supporting notes will exit
909+
with a message indicating so.
907910

908911
`option`
909912
~~~~~~~~

fast-import.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,6 +2815,8 @@ static int parse_one_feature(const char *feature, int from_stream)
28152815
relative_marks_paths = 0;
28162816
} else if (!prefixcmp(feature, "force")) {
28172817
force_update = 1;
2818+
} else if (!strcmp(feature, "notes")) {
2819+
; /* do nothing; we have the feature */
28182820
} else {
28192821
return 0;
28202822
}

t/t9301-fast-import-notes.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ test_expect_success 'add notes with simple M command' '
120120

121121
test_tick
122122
cat >input <<INPUT_END
123+
feature notes
123124
commit refs/notes/test
124125
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
125126
data <<COMMIT

0 commit comments

Comments
 (0)