Reputation: 4516
I'm using stepup to manage git notes that are used to automate version numbering and release notes.
The notes in one of our repos seem to be messed up:
$ git log HEAD
commit 04c85f5ad7e5d60de8c9f0b8e08681e833751909
Author: Daniel Serodio <[email protected]>
Date: Wed Oct 29 15:47:55 2014 -0200
non-deps removed
Notes (added):
splittest beta
However:
$ git notes show HEAD
error: No note found for object 04c85f5ad7e5d60de8c9f0b8e08681e833751909.
Does anyone have a clue about the cause and/or the fix for this?
Upvotes: 1
Views: 700
Reputation: 1326746
git log
respects the configuration entrynotes.displayRef
Indeed. Make sure to not set it to an empty value in your test, or it would segfault (before Git 2.30 (Q1 2021))
The Config parser has been fixed for git notes
.
See commit 45fef15, commit c3eb95a (22 Nov 2020) by Nate Avers (nateavers
).
(Merged by Junio C Hamano -- gitster
-- in commit e082a85, 30 Nov 2020)
notes.c
: fix a segfault innotes_display_config()
Signed-off-by: Nate Avers
If
notes.displayRef
is configured with no value[1]
, control should be returned to the caller whennotes.c
:notes_display_config()
checks if 'v
' isNULL
.
Otherwise, bothgit log --notes
(man) andgit diff-tree --notes
(man) will subsequently segfault whenrefs.h
:has_glob_specials()
callsstrpbrk()
with aNULL
first argument.
[1]
Examples:.git/config: [notes] displayRef $ git -c notes.displayRef [...]
Upvotes: 0
Reputation: 14863
git log
respects the configuration entry notes.displayRef which I am guessing you have to set to either '*' or 'added'
To make git notes
show it try
git notes --ref=added show HEAD
Upvotes: 4