tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
19.84k stars 1.01k forks source link

Support git notes #912

Open a-m-s opened 7 years ago

a-m-s commented 7 years ago

Please add support for the "git notes" command.

Basically, "Gnotes" should do the equivalent of "git notes edit", including the in-message help, and deletion of notes entered empty.

a-m-s commented 5 years ago

Also, the "commit" view should display the notes in the same way that "git log" does.

I think the git notes concept supersedes what's described in #133.

tpope commented 5 years ago

I'm on board, but this is pretty low on the priority list. The first step is to make fugitive#BufReadCmd(), when called from a buffer with a name like fugitive:///path/to/repo/.git//notes/123456789abcdef...., load the notes for the given commit into the buffer. s:ReplaceCmd() should be able to do most of the work, the new code will mostly be a bit of parsing and flow control. Get a proof of concept patch for this and we can discuss next steps.

a-m-s commented 4 years ago

The pull request covers display of the notes.

The note can be edited with :G notes edit <rev>, but of course that opens an editor in a subprocess. It would be nice to have a solution for that too.

CervEdin commented 1 year ago

The pull request covers display of the notes.

The note can be edited with :G notes edit <rev>, but of course that opens an editor in a subprocess. It would be nice to have a solution for that too.

This fits most of my needs.

Just adding that you can <C-R><C-G> to get the SHA.

So you can do :G notes edit <C-R><C-G>, if you are in a commit in Fugitive