diff options
author | Jeff King <peff@peff.net> | 2013-04-02 10:22:19 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-02 13:34:55 -0700 |
commit | 97276019bb20829c97528b53dc453a37177c35bb (patch) | |
tree | 6cbc4d88a238ca033e27a81349c6e6cb620ca538 /compat/precompose_utf8.h | |
parent | Git 1.8.0.3 (diff) | |
download | tgif-97276019bb20829c97528b53dc453a37177c35bb.tar.xz |
filter-branch: return to original dir after filtering
The first thing filter-branch does is to create a temporary
directory, either ".git-rewrite" in the current directory
(which may be the working tree or the repository if bare),
or in a directory specified by "-d". We then chdir to
$tempdir/t as our temporary working directory in which to run
tree filters.
After finishing the filter, we then attempt to go back to
the original directory with "cd ../..". This works in the
.git-rewrite case, but if "-d" is used, we end up in a
random directory. The only thing we do after this chdir is
to run git-read-tree, but that means that:
1. The working directory is not updated to reflect the
filtered history.
2. We dump random files into "$tempdir/.." (e.g., if you
use "-d /tmp/foo", we dump junk into /tmp).
Fix it by recording the full path to the original directory
and returning there explicitly.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/precompose_utf8.h')
0 files changed, 0 insertions, 0 deletions