Skip to content

RFC Bring the_repository into cmd_foo

Stefan Beller git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2repository: have get_the_repository() to remove the_repository dependencyrepository.c repository.h+22 -10 replies
2/2builtin/merge-base.c: do not rely on the_repository any morebuiltin/merge-base.c t/t6010-merge-base.sh+43 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] Bring the_repository into cmd_foo
Quoted 9 lines · Derrick Stolee
Quoted 2 lines

I had one high-level question: How are we testing that these "arbitrary repository" changes are safe?

[...]
Or instead we could accelerate the long term plan of removing a hard coded the_repository and have each cmd builtin take an additional repository pointer from the init code, such that we'd bring all of Git to work on arbitrary repositories. Then the standard test suite should be okay, as there is no special case for the_repository any more.

Demo'd in this RFC series for git-merge-base.

The core idea is found in patch 1,
and the proof of concept is found in patch 2.

What do you think?

Thanks,
Stefan

Stefan Beller (3):
repository: have get_the_repository() to remove the_repository
dependency
builtin/merge-base.c: do not rely on the_repository any more

 builtin/merge-base.c  | 67 ++++++++++++++++++++++++++-----------------
 repository.c          | 10 +++++++
 repository.h          | 13 ++++++++-
 t/t6010-merge-base.sh |  3 +-
Signature · 1 line
2.19.0