A minimal reproduction is shown below: git init touch file git add file git commit -m"Commit" git rebase --root --exec="git clone . subrepo"It is a bit convoluted for the sake of being self contained. But any git command in `--exec` acting on a different repo than the one being rebased will fail. See my ticket on CMake [0] for a more real usecase.
As mentioned in the other ticket, unsetting these variables will work around the issue.
git rebase --root --exec="env -u GIT_DIR -u GIT_WORK_TREE git clone . subrepo" [0] https://gitlab.kitware.com/cmake/cmake/issues/18778 Regards
Attachment:
signature.asc
Description: PGP signature