summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-02-16 14:32:59 -0800
committerJunio C Hamano <gitster@pobox.com>2011-02-16 14:32:59 -0800
commitda656f17d37fe96454645c08f21a24134f5aa900 (patch)
tree4fb50c4122a0e00a9fd2baac4849d0249b818113
parent960ac5ff99304404d287b8174d7c8a7743c6d97a (diff)
parent6a7f71d376becc1a5b0357b682dd0c20842104b0 (diff)
downloadgit-da656f17d37fe96454645c08f21a24134f5aa900.tar.gz
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
-rw-r--r--Documentation/git-fast-import.txt43
-rw-r--r--fast-import.c2
-rwxr-xr-xt/t9301-fast-import-notes.sh1
3 files changed, 26 insertions, 20 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 2c6ad5b2f3..4349d6a9a6 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -882,28 +882,31 @@ Require that fast-import supports the specified feature, or abort if
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 7563e43a39..8be8a5b732 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2815,6 +2815,8 @@ static int parse_one_feature(const char *feature, int from_stream)
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;
}
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh
index a5c99d8507..164edf0c3d 100755
--- a/t/t9301-fast-import-notes.sh
+++ b/t/t9301-fast-import-notes.sh
@@ -120,6 +120,7 @@ test_expect_success 'add notes with simple M command' '
test_tick
cat >input <<INPUT_END
+feature notes
commit refs/notes/test
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT