hg equivalent of git notes

前端 未结 1 1095
花落未央
花落未央 2021-02-04 16:23

Is there a command in mercurial, that works like git notes?

相关标签:
1条回答
  • 2021-02-04 16:38

    Not that I know of: I do not think Hg has yet a special kind of object to associate to commit message.

    Introduced in July 2007, "git notes" by Johannes Schindelin, notes are:

    Commit notes are blobs which are shown together with the commit message.
    These blobs are taken from the notes ref, which you can configure by the config variable core.notesRef, which in turn can be overridden by the environment variable GIT_NOTES_REF.

    The notes ref is a branch which contains trees much like the loose object trees in .git/objects/. In other words, to get at the commit notes for a given SHA-1, take the first two hex characters as directory name, and the remaining 38 hex characters as base name, and look that up in the notes ref.

    The rationale for putting this information into a ref is this:
    we want to be able to fetch and possibly union-merge the notes, maybe even look at the date when a note was introduced, and we want to store them efficiently together with the other objects.

    "git notes" is still evolving right now (February 2010).

    0 讨论(0)
提交回复
热议问题