Commit 206af7c9 authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  fast-import: introduce "feature notes" command
  fast-import: clarify documentation of "feature" command
parents 567323d3 547e8b92
...@@ -878,28 +878,31 @@ Require that fast-import supports the specified feature, or abort if ...@@ -878,28 +878,31 @@ Require that fast-import supports the specified feature, or abort if
it does not. it does not.
.... ....
'feature' SP <feature> LF 'feature' SP <feature> ('=' <argument>)? LF
.... ....
The <feature> part of the command may be any string matching The <feature> part of the command may be any one of the following:
^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
date-format::
Feature work identical as their option counterparts with the export-marks::
exception of the import-marks feature, see below. relative-marks::
no-relative-marks::
The following features are currently supported: force::
Act as though the corresponding command-line option with
* date-format a leading '--' was passed on the command line
* import-marks (see OPTIONS, above).
* export-marks
* relative-marks import-marks::
* no-relative-marks Like --import-marks except in two respects: first, only one
* force "feature import-marks" command is allowed per stream;
second, an --import-marks= command-line option overrides
The import-marks behaves differently from when it is specified as any "feature import-marks" command in the stream.
commandline option in that only one "feature import-marks" is allowed
per stream. Also, any --import-marks= specified on the commandline notes::
will override those from the stream (if any). Require that the backend support the 'notemodify' (N)
subcommand to the 'commit' command.
Versions of fast-import not supporting notes will exit
with a message indicating so.
`option` `option`
~~~~~~~~ ~~~~~~~~
......
...@@ -2798,6 +2798,8 @@ static int parse_one_feature(const char *feature, int from_stream) ...@@ -2798,6 +2798,8 @@ static int parse_one_feature(const char *feature, int from_stream)
relative_marks_paths = 0; relative_marks_paths = 0;
} else if (!prefixcmp(feature, "force")) { } else if (!prefixcmp(feature, "force")) {
force_update = 1; force_update = 1;
} else if (!strcmp(feature, "notes")) {
; /* do nothing; we have the feature */
} else { } else {
return 0; return 0;
} }
......
...@@ -120,6 +120,7 @@ test_expect_success 'add notes with simple M command' ' ...@@ -120,6 +120,7 @@ test_expect_success 'add notes with simple M command' '
test_tick test_tick
cat >input <<INPUT_END cat >input <<INPUT_END
feature notes
commit refs/notes/test commit refs/notes/test
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT data <<COMMIT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment