Skip to content

Commit

Permalink
stash: fix incorrect quoting in cleanup of temporary files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Mar 17, 2011
1 parent ea2c69e commit 23a32ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require_work_tree
cd_to_toplevel

TMP="$GIT_DIR/.git-stash.$$"
trap 'rm -f "$TMP-*"' 0
trap 'rm -f "$TMP-"*' 0

ref_stash=refs/stash

Expand Down

0 comments on commit 23a32ff

Please sign in to comment.