author | Junio C Hamano <gitster@pobox.com> | |
Wed, 16 Feb 2011 22:32:47 +0000 (14:32 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 16 Feb 2011 22:32:47 +0000 (14:32 -0800) |
* maint-1.7.0:
fast-import: introduce "feature notes" command
fast-import: clarify documentation of "feature" command
fast-import: introduce "feature notes" command
fast-import: clarify documentation of "feature" command
Documentation/git-fast-import.txt | patch | blob | history | |
fast-import.c | patch | blob | history | |
t/t9301-fast-import-notes.sh | patch | blob | history |
index 19082b04eb7ec77bcf974e0c76b8d20bb736c021..becee8b4e71859674495cff398a4de976f3f6a3b 100644 (file)
it does not.
....
- 'feature' SP <feature> LF
+ 'feature' SP <feature> ('=' <argument>)? LF
....
-The <feature> part of the command may be any string matching
-^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
-
-Feature work identical as their option counterparts with the
-exception of the import-marks feature, see below.
-
-The following features are currently supported:
-
-* date-format
-* import-marks
-* export-marks
-* relative-marks
-* no-relative-marks
-* force
-
-The import-marks behaves differently from when it is specified as
-commandline option in that only one "feature import-marks" is allowed
-per stream. Also, any --import-marks= specified on the commandline
-will override those from the stream (if any).
+The <feature> part of the command may be any one of the following:
+
+date-format::
+export-marks::
+relative-marks::
+no-relative-marks::
+force::
+ Act as though the corresponding command-line option with
+ a leading '--' was passed on the command line
+ (see OPTIONS, above).
+
+import-marks::
+ Like --import-marks except in two respects: first, only one
+ "feature import-marks" command is allowed per stream;
+ second, an --import-marks= command-line option overrides
+ any "feature import-marks" command in the stream.
+
+notes::
+ 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`
~~~~~~~~
diff --git a/fast-import.c b/fast-import.c
index 309f2c58a2ba431a82a56f757482a5093cc8257d..bce460e2edc1ae7331e2b25523794d834b970c26 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
relative_marks_paths = 0;
} else if (!prefixcmp(feature, "force")) {
force_update = 1;
+ } else if (!strcmp(feature, "notes")) {
+ ; /* do nothing; we have the feature */
} else {
return 0;
}
index a5c99d85074a3e04d699afd9b0990a89afe33f54..164edf0c3da8d89513782b842ebdfb4dc3d84c7e 100755 (executable)
test_tick
cat >input <<INPUT_END
+feature notes
commit refs/notes/test
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT