Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support using notes via a commit rather than a ref #3782

Closed
joshtriplett opened this issue May 11, 2016 · 11 comments
Closed

Please support using notes via a commit rather than a ref #3782

joshtriplett opened this issue May 11, 2016 · 11 comments

Comments

@joshtriplett
Copy link
Contributor

joshtriplett commented May 11, 2016

The various functions that support git notes, such as git_note_iterator_new, git_note_read, git_note_create, and git_note_remove all take a notes_ref as a string (defaulting to refs/notes/commits). Please consider adding support to use a commit instead of a ref; the functions to read notes would just need the commit, and the functions to write notes would take a notes commit and return a new notes commit. This would allow storing the notes commit(s) in another way, rather than as a reference.

The existing functions that use a notes ref would then become simple wrappers around the lower-level API.

@richardipsum
Copy link
Contributor

richardipsum commented Mar 10, 2017

@joshtriplett I'd like to help with this if possible. But I don't see how the notes_ref parameter can be avoided in the low level calls that would take a commit instead of a notes_ref, if the higher level functions that take a notes_ref are to keep their existing functionality. So long as you provide the means to put notes somewhere other than refs/notes/commits you will need the notes_ref parameter.

@joshtriplett
Copy link
Contributor Author

joshtriplett commented Mar 10, 2017

@richardipsum The functions that read notes would take a commit instead of a notes_ref string, and the existing functions would read the ref, turn it into a commit, and pass that. The functions that write notes would take an optional parent commit and return a new commit, and the existing functions would (with appropriate locking) read the ref, turn it into a commit, pass that, get back a commit, and write that to the ref.

@richardipsum
Copy link
Contributor

@joshtriplett Right I see, so literally just swapping the const char *notes_ref for git_commit *notes_commit? Okay I'll give this a try.

@joshtriplett
Copy link
Contributor Author

@richardipsum That and a git_commit ** out parameter for calls that write notes to provide the new commit they create.

@richardipsum
Copy link
Contributor

Ack 😸

@richardipsum
Copy link
Contributor

Hi! Sorry it's taken me so long to get this done. Pull request #4159 implements this feature request and is ready for review. :)

@richardipsum
Copy link
Contributor

@carlosmn Hi, do you have any thoughts on my attempt at implementing this feature request?

@richardipsum
Copy link
Contributor

@ethomson I implemented the solution to this issue 3 months ago and I've had no feedback at all, it seems as if there's no real desire for this functionality, can I suggest then that we close both the PR and this issue?

@joshtriplett
Copy link
Contributor Author

@richardipsum I'm still really interested in this, and I'm sorry to see that you haven't gotten much response.

@richardipsum
Copy link
Contributor

@pks-t You seem pretty active here can you help solve this issue? I opened the PR for it ages ago

@ethomson
Copy link
Member

Fixed via #4159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants