(converting comments to answer)
The tree filter is run in a directory that is not the normal working directory for the repository. (The actual directory is derived from from the -d
argument to git filter-branch
, if you supply one; if you don't supply one, filter-branch starts with .git-rewrite
. To this, it looks like the filter-branch
script adds /t
:
orig_dir=$(pwd)
mkdir -p "$tempdir/t" &&
tempdir="$(cd "$tempdir"; pwd)" &&
cd "$tempdir/t" &&
workdir="$(pwd)" ||
die ""
and then uses files in $tempdir
for everything else.)
Thus, if any paths in fixup.sh
refer back to the original working directory, git won't see those changes in the temporary trees.