Commit creation API streamlining #5116
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rebase of #3075, with the attempt at a more general low-level API I've envisioned for #4913 (comment).
It's slightly different in that I (should) have taken care of not changing anything with old API, and only implement new things on top on newly added functions.
And then I'm adding low-level methods to manipulate a
git_commit_desc
, which serves to keep track of "the parts of a commit", via the following way.git_commit_desc
git_commit_desc
, and some options.This is still very much in flux, as I'm still trying to see how much things I can delegate to the low-level helpers (stuff like
fromstate
becomes an option when object-writing). Ideally in the end it should be possible to reimplement all the new "helpers" from #3075 using those two, but I wanted the "cleaner API" first. Thus, any design insights would be welcome.