On Sat, Oct 28, 2017 at 9:00 AM, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > Hi Jake, > > On Fri, 27 Oct 2017, Jacob Keller wrote: > >> From: Jacob Keller <jacob.keller@xxxxxxxxx> >> >> I noticed a failure with git rebase interactive mode which causes "exec" >> commands to be run with GIT_DIR set. When GIT_DIR is in the environment, >> then any command which results in running a git command in >> a subdirectory will fail because GIT_DIR=".git". >> >> This unfortunately breaks one of my project's Makefiles, which uses >> git-describe to find the version information, but does so from within >> a sub directory. >> >> I'm in the process of running a bisect to find where this got >> introduced, but I suspect it's part of the rebase--helper changes that >> happened a while ago. > > A safe assumption. I do not know how the shell code managed that GIT_DIR > reset, though: > > -- snip from v2.12.0's git-rebase--interactive.sh -- > x|"exec") > read -r command rest < "$todo" > mark_action_done > eval_gettextln "Executing: \$rest" > "${SHELL:-@SHELL_PATH@}" -c "$rest" # Actual execution > -- snap -- > > > *However*, your test still fails with this, as > Yea I'm not surprised the test failed, I was in a hurry at the end of the workday when I spotted it, but wanted to get something on the mailing list before I left. > - your added test tries to remove the directory with -ff instead of -rf > > - it tries to run `git rebase --abort` afterwards, which fails with my fix > because there is no rebase in progress > > - instead of `cd subdir && ...`, it calls `>cd subdir && ...`, which > causes it to abort with a "subdir: not fonud" > <snip> > > I only had time to write these two patches, and to verify that t3404 > passes now, but not that anything else passes, neither to write a proper > commit message. > > Maybe you can take it from there? > Yep, thanks for spotting the fix! Thanks, Jake > Ciao, > Dscho