Re: In some rebases, `exec git -C ...` has wrong working directory

2018-04-27 Thread William Chargin
Hi Johannes, Thanks for your reply. Part of my confusion was regarding the interaction between `-C` and `--git-dir`. For instance, we have $ git --git-dir target -C /tmp/tmp.Cl4aXMSVis init Initialized empty Git repository in /tmp/tmp.Cl4aXMSVis/target/ which makes sense and is what I e

Re: In some rebases, `exec git -C ...` has wrong working directory

2018-04-27 Thread Johannes Schindelin
Hi William, On Thu, 26 Apr 2018, William Chargin wrote: > Here is a repro script: > > #!/bin/sh > set -eux > git --version > tmpdir="$(mktemp -d)" > cd "${tmpdir}" > mkdir target repo > cd repo > git init > touch file; git add file > git commit -m "Initial

In some rebases, `exec git -C ...` has wrong working directory

2018-04-26 Thread William Chargin
Here is a repro script: #!/bin/sh set -eux git --version tmpdir="$(mktemp -d)" cd "${tmpdir}" mkdir target repo cd repo git init touch file; git add file git commit -m "Initial commit" git rebase HEAD --exec "git -C ${tmpdir}/target init" The end of thi