Jeff King <peff@xxxxxxxx> writes: > None of which is too surprising. The root of the bug is in the > conversion to rebase--helper, I think, when presumably we started > setting GIT_DIR at all (but I didn't dig further). Then 09d7b6c6fa fixed > _one_ fallout of that, which was relative paths, but didn't help the > subdirectory case. > > Just reading over this thread, I suspect the simplest fix is to pass > GIT_DIR and GIT_WORK_TREE together, which is almost always the right > thing to do. Perhaps. Not exporting GIT_DIR (unless the end-user already did to the environment before starting "git rebase"---it would be a bad change to unexport it unconditionally) may probably be a way to make rebase--helper conversion more faithful to the original scripted Porcelain, but I suspect in practice always giving GIT_DIR and GIT_WORK_TREE would work well for many existing hooks.