felipec / git-remote-hg

Transparent bidirectional bridge between Git and Mercurial for Git
GNU General Public License v2.0
369 stars 87 forks source link

How to undo git config core.notesRef refs/notes/hg? #91

Closed ouboub closed 1 year ago

ouboub commented 1 year ago

When I installed your converter, I also run

      git config core.notesRef refs/notes/hg

Now when running

git log --graph --all
  I see 
* commit e11d6d43324dd26afd0de11c0965cfb4a935a301
  Author: remote-hg <>
  Date:   Sat Apr 22 15:37:26 2023 +0100

      Notes for org-mode

* commit f6334dde5bff3917ae2cd1a9bf564977a9ce0408 (HEAD -> org-mode, hg-remote/branches/org-mode)
| Author: Uwe Brauer <oub@mat.ucm.es>
| Date:   Sat Apr 22 16:36:47 2023 +0200
|
|     Add org file, that describe how to use the python engine not the native one
|
|     --HG--
|     branch : org-mode
|

Which I don't like, how can I get rid of these commits whose author is remote-hg? I searched the global .gitconfig and the local one, but could find anything to respect of this variable? regards Uwe Brauer

felipec commented 1 year ago

The core.notesRef config is kind of independent: git-remote-hg always store the hg revision hashes in refs/notes/hg but that has no effect on git unless core.notesRef is configured.

git log --all lists all the refs, which includes refs/notes/hg, if you don't want to see all the refs, but only branches, then you should do git log --branches instead.

This is not a bug, this is normal intended git behavior.