vcs-fast-import-devs team mailing list archive
-
vcs-fast-import-devs team
-
Mailing list archive
-
Message #00091
[RFC] fast-import: notemodify (N) command
Dear fast importers,
Another week, another fast-import protocol extension.
Most DVCSes do not allow one to non-disruptively change the log
message for a commit. But sometimes people want to attach information to a
commit after the fact:
- whether it was tested and worked correctly
- who liked or disliked the commit (Acked-by, Reviewed-by)
- corresponding revision number after export to another version
control system
- bug number
- corresponding compiled binary
The N command allows such notes to be attached to commits, like so:
1. first the commit is imported as usual (let's say it's ":1").
2. commit annotations are added separately, like so:
commit refs/notes/commits
committer A. U. Thor <author@xxxxxxxxxxx> Mon, 31 Jan 2011 12:15:59 -0600
data <<END
Notes after review.
END
N inline :1
data <<END
Acked-by: me
END
Details:
- there can be multiple categories of notes: "refs/notes/commits"
contains ordinary addenda to the commit message, but one might also
see refs/notes/bugzilla, refs/notes/svn-commit, and so on.
- each commit gets at most one blob of notes in each category. Later
notemodify (N) commands overwrite the effect from earlier ones.
- the syntax of a notemodify command is as follows:
'N' sp <dataref> sp <committish> lf
The <dataref> represents a blob with the annotations to be used
("inline" is allowed, too, just like with filemodify). The
<committish> can be any expression allowed in a 'from' command
(branch name, mark reference :<idnum>, other commit name) and
represents the commit that is to be annotated.
- this has been supported in git since v1.6.6. There is no
"feature" for it --- I don't think the feature declaration
facility existed yet.
Do other DVCSes support something like this? Should it get a
feature name?
Jonathan
Follow ups