Skip to content
  • Johannes Schindelin's avatar
    Introduce commit notes · a97a7468
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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 "files" whose names are
    the names of the corresponding commits (i.e. the SHA-1).
    
    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.
    
    This patch has been improved by the following contributions:
    - Thomas Rast: fix core.notesRef documentation
    - Tor Arne Vestbø: fix printing of multi-line notes
    - Alex Riesen: Using char array instead of char pointer costs less BSS
    - Johan Herland: Plug leak when msg is good, but msglen or type causes return
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarThomas Rast <trast@student.ethz.ch>
    Signed-off-by: default avatarTor Arne Vestbø <tavestbo@trolltech.com>
    Signed-off-by: default avatarJohan Herland <johan@herland.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    
    get_commit_notes(): Plug memory leak when 'if' triggers, but not because of read_sha1_file() failure
    a97a7468