diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-02-09 16:43:57 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-09 16:06:51 -0800 |
commit | 547e8b9205349b47003ed25a82673e413e71c255 (patch) | |
tree | 23fdeed1c91807f11d8fbe5bb1d79c80c97da037 /t | |
parent | 68595cd442caabbd8b43ff0789d2829454efff1b (diff) | |
download | git-547e8b9205349b47003ed25a82673e413e71c255.tar.gz git-547e8b9205349b47003ed25a82673e413e71c255.tar.xz |
fast-import: introduce "feature notes" command
Here is a 'feature' command for streams to use to require support for
the notemodify (N) command.
When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4,
2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8,
2009-10-09) and it was not obvious it deserved to be a named feature.
But now that is clear, since all major non-git fast-import backends
lack support for it.
Details: on git version with this patch applied, any "feature notes"
command in the features/options section at the beginning of a stream
will be treated as a no-op. On fast-import implementations without
the feature (and older git versions), the command instead errors out
with a message like
This version of fast-import does not support feature notes.
So by declaring use of notes at the beginning of a stream, frontends
can avoid wasting time and other resources when the backend does not
support notes. (This would be especially important for backends that
do not support rewinding history after a botched import.)
Improved-by: Thomas Rast <trast@student.ethz.ch>
Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9301-fast-import-notes.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh index a5c99d850..164edf0c3 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 |