1
0
mirror of https://github.com/git/git.git synced 2024-11-19 06:04:26 +01:00

stash: fix incorrect quoting in cleanup of temporary files

The * was inside the quotes, so that the pattern was never expanded and the
temporary files were never removed. As a consequence, 'stash -p' left a
.git-stash-*-patch file in $GIT_DIR. Other code paths did not leave files
behind because they removed the temporary file themselves, at least in
non-error paths.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Sixt 2011-03-16 09:14:33 +01:00 committed by Junio C Hamano
parent ea2c69ed47
commit 23a32ffe80

@ -17,7 +17,7 @@ require_work_tree
cd_to_toplevel cd_to_toplevel
TMP="$GIT_DIR/.git-stash.$$" TMP="$GIT_DIR/.git-stash.$$"
trap 'rm -f "$TMP-*"' 0 trap 'rm -f "$TMP-"*' 0
ref_stash=refs/stash ref_stash=refs/stash