git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: git@vger.kernel.org
Cc: Bert Wesarg <bert.wesarg@googlemail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Jakob Pfender <jpfender@elegosoft.com>,
	casey@nrlssc.navy.mil, jon.seymour@gmail.com
Subject: [PATCH 1/2] stash: fix incorrect quoting in cleanup of temporary files
Date: Wed, 16 Mar 2011 09:14:33 +0100	[thread overview]
Message-ID: <4D807169.5070804@viscovery.net> (raw)
In-Reply-To: <4D8070E1.8000305@viscovery.net>

From: Johannes Sixt <j6t@kdbg.org>

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>
---
 git-stash.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-stash.sh b/git-stash.sh
index 7561b37..7c0d563 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -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
 
-- 
1.7.4.1.316.g2ab2cb

  reply	other threads:[~2011-03-16  8:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 10:08 [RFD] git stash over OpenBSD/Linux NFS - cp -p breakage Jakob Pfender
2011-03-15 10:58 ` Johannes Sixt
2011-03-15 12:00   ` Jakob Pfender
2011-03-15 12:37     ` [PATCH] stash: copy the index using --index-output instead of cp -p Johannes Sixt
2011-03-15 19:28       ` Junio C Hamano
2011-03-15 19:53         ` Bert Wesarg
2011-03-16  8:12           ` Johannes Sixt
2011-03-16  8:14             ` Johannes Sixt [this message]
2011-03-16  8:18             ` [PATCH 2/2 v2] " Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D807169.5070804@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=bert.wesarg@googlemail.com \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jon.seymour@gmail.com \
    --cc=jpfender@elegosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).