- 27 Jun, 2022 1 commit
-
-
Yuang Li committed
-
- 27 Jun, 2020 5 commits
-
-
If replacing an already existing graft in the grafts map, then we need to free the previous `git_commit_graft` structure.
Patrick Steinhardt committed -
The refresh logic for both "normal" and shallow grafts are currently part of the repository code and implemented twice. Unify them into the grafts code by introducing two new functions to create grafts from a file and to refresh a grafts structure.
Patrick Steinhardt committed -
The shallow roots are in fact another user of the grafting mechanism, and in essence they do use the same file format for grafted commits. Thus, instead of hand-coding the parsing logic a second time, we can just reuse the `git_grafts` structure for shallow commits, as well.
Patrick Steinhardt committed -
Parsing of grafts files is currently contained in the repository code. To make grafts-related logic more self-contained, move it into "grafts.c" instead.
Patrick Steinhardt committed -
In order to increase maintainability in the future, we should try to make structures as self-contained and opaque to its users as possible. Thus it is probably not a good idea to just typedef `git_graftmap` to `git_oidmap`, as that will make it a lot harder in the future to extend the API in the future, if this need ever arises. Refactor the code to instead declare a real structure `git_grafts`, which is completely opaque to its callers.
Patrick Steinhardt committed
-