- 
                Notifications
    
You must be signed in to change notification settings  - Fork 636
 
Open
Labels
Description
It appears that tig interprets lines in notes which start with commit
or COMMIT and probably other casing variants as commit object.
NB: issue does not occur with  commit.
I've made a repro in my fork of tig:
master...CervEdin:tig:master
Issue can be seen by cloning it and fetching its notes:
# Clone the repo
git clone [email protected]:CervEdin/tig.git
cd tig
# Fetch notes
git fetch origin 'refs/notes/*:refs/notes/*'
The first two commits on the master branch of the clone repro the issue I'm seeing:
$ git log --pretty=raw --show-notes HEAD~3..HEAD
commit 6e3f0f7255de4b3c9f58676ffc3cf36afef5d6c7
tree 45dc9379649aef54ea5769feda19898f87421cb7
parent b0ae81454c8efff7e376d11991678faaf171f682
author Erik Cervin-Edin <[email protected]> 1761384995 +0200
committer Erik Cervin-Edin <[email protected]> 1761384995 +0200
    Test [:space:]commit
Notes:
    Some note text
     commit should not be parsed as a commit boundary      <-- NB: not a problem
    This is still part of the note
commit b0ae81454c8efff7e376d11991678faaf171f682
tree 45dc9379649aef54ea5769feda19898f87421cb7
parent 951152f51954c71a66e76d6d83d28ebe6ce08707
author Erik Cervin-Edin <[email protected]> 1761383771 +0200
committer Erik Cervin-Edin <[email protected]> 1761383808 +0200
    Test commit
Notes:
    Some note text
    commit should not be parsed as a commit boundary
    This is still part of the note
commit 951152f51954c71a66e76d6d83d28ebe6ce08707
tree 45dc9379649aef54ea5769feda19898f87421cb7
parent e5d9aa2d7988ab53ef78bd4c408a87836b602c25
author Erik Cervin-Edin <[email protected]> 1761383703 +0200
committer Erik Cervin-Edin <[email protected]> 1761383803 +0200
    Test COMMIT
Notes:
    Some note text
    COMMIT should not be parsed as a commit boundary
    This is still part of the note
Viewing those in tig highlights the issue:
TIG_SCRIPT=<(echo ":set show-notes = yes") TIGRC_SYSTEM= TIGRC_USER=/dev/null tig HEAD~4..
Seen in:
$ tig --version
tig version 2.6.0
ncursesw version 6.5.20240427
readline version 8.3
PCRE2 version 10.46 2025-08-27