I've been reading through the git code from the beginning. This patch series fixes some NEEDSWORKs and cleans up some unnecessary uses of the_repository that I came across. The first commit replace the use of the_repository to run_builtin()'s argument repo. Since each caller pass the_repository to run_builtin(), this replacement is safe. This commit also rewrite a comment before trace_repo_setup(), I am not sure my version of rewrite match the code semantics. So I am reaching out for help and hoping to get some feedback and discussion. The second commit takes care of a NEEDSWORK in setup_git_directory_gently() we now properly error out if we hit a .git that is not a file or directory when looking for the .git. Lidong Yan (2): git.c: remove the_repository dependence in run_builtin() setup: fix NEEDSWORK in setup_git_directory_gently() git.c | 6 +++--- setup.c | 11 +++++++---- setup.h | 18 +++++++++++------- worktree.c | 4 ++-- 4 files changed, 23 insertions(+), 16 deletions(-) -- 2.50.0-rc1