Skip to content

Commit b421812

Browse files
divanoramagitster
authored andcommitted
doc/fast-import: clarify notemodify command
The "notemodify" fast-import command was introduced in commit a8dd2e7 (fast-import: Add support for importing commit notes, 2009-10-09) The commit log has slightly different description than the added documentation. The latter is somewhat confusing. "notemodify" is a subcommand of "commit" command used to add a note for some commit. Does this note annotate the commit produced by the "commit" command or a commit given by it's committish parameter? Which notes tree does it write notes to? The exact meaning could be deduced with old description and some notes machinery knowledge. But let's make it more obvious. This command is used in a context like "commit refs/notes/test" to add or rewrite an annotation for a committish parameter. So the advised way to add notes in a fast-import stream is: 1) import some commits (optional) 2) prepare a "commit" to the notes tree: 2.1) choose notes ref, committer, log message, etc. 2.2) create annotations with "notemodify", where each can refer to a commit being annotated via a branch name, import mark reference, sha1 and other expressions specified in the Documentation. Signed-off-by: Dmitry Ivankov <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent df6b0ca commit b421812

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Documentation/git-fast-import.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,14 @@ paths for a commit are encouraged to do so.
648648

649649
`notemodify`
650650
^^^^^^^^^^^^
651-
Included in a `commit` command to add a new note (annotating a given
652-
commit) or change the content of an existing note. This command has
653-
two different means of specifying the content of the note.
651+
Included in a `commit` `<notes_ref>` command to add a new note
652+
annotating a `<committish>` or change this annotation contents.
653+
Internally it is similar to filemodify 100644 on `<committish>`
654+
path (maybe split into subdirectories). It's not advised to
655+
use any other commands to write to the `<notes_ref>` tree except
656+
`filedeleteall` to delete all existing notes in this tree.
657+
This command has two different means of specifying the content
658+
of the note.
654659

655660
External data format::
656661
The data content for the note was already supplied by a prior

0 commit comments

Comments
 (0)