Cleanup refs API [WAS: Re: [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API]
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | replace-objects: use arbitrary repositoriesreplace-object.c | +3 | 0 replies | |
| 2/2 | refs: switch for_each_replace_ref back to use a ref_storebuiltin/ refs.c refs.h +1 more | +5 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Cleanup refs API [WAS: Re: [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API]
Quoted 9 lines
Quoted 3 lines
I anticipate that we need to have a lot of back pointers to the repository in question, hence I think we should have the repository pointer promoted to not just a back pointer.
I will probably need more time to study that commit and maybe the mail archive for the history of this series. But if I remember correctly some of these
for_each_api is quite a pain (perhaps it's thefor_eachversion of reflog?) and it's probably better to redesign it (again talking without real understanding of the problem).
I stepped back a bit and reconsidered the point made above, and I do not think that the repository argument is any special. If you need a repository (for e.g. lookup_commit or friends), you'll have to pass it through the callback cookie, whether directly or as part of a struct tailored to your purpose.
Instead we should strive to make the refs API smaller and cleaner, omitting the repository argument at all, and instead should be focussing on a ref_store argument instead.
This series applies on master; when we decide to go this direction we can drop origin/sb/refs-in-repo.
Thanks,
Stefan
Derrick Stolee (1):
replace-objects: use arbitrary repositories
Stefan Beller (1):
refs: switch for_each_replace_ref back to use a ref_store
builtin/replace.c | 4 +--- refs.c | 4 ++-- refs.h | 2 +- replace-object.c | 5 +++-- 4 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
2.18.0.132.g195c49a2227