All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] notes: only clean up message file when editing
@ 2009-02-14 19:15 Thomas Rast
  2009-02-14 19:15 ` [PATCH 2/4] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR Thomas Rast
                   ` (3 more replies)
  0 siblings, 4 replies; 47+ messages in thread
From: Thomas Rast @ 2009-02-14 19:15 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin

We clean up the notes file when exiting.  However, actions other than
'edit' have nothing to do with the file, so they should not remove it
when done.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 git-notes.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/git-notes.sh b/git-notes.sh
index 9cbad02..246df65 100755
--- a/git-notes.sh
+++ b/git-notes.sh
@@ -14,13 +14,13 @@ test -z "$GIT_NOTES_REF" && GIT_NOTES_REF="refs/notes/commits"
 COMMIT=$(git rev-parse --verify --default HEAD "$@") ||
 die "Invalid commit: $@"
 
-MESSAGE="$GIT_DIR"/new-notes-$COMMIT
-trap '
-	test -f "$MESSAGE" && rm "$MESSAGE"
-' 0
-
 case "$ACTION" in
 edit)
+	MESSAGE="$GIT_DIR"/new-notes-$COMMIT
+	trap '
+		test -f "$MESSAGE" && rm "$MESSAGE"
+	' 0
+
 	GIT_NOTES_REF= git log -1 $COMMIT | sed "s/^/#/" > "$MESSAGE"
 
 	GIT_INDEX_FILE="$MESSAGE".idx
-- 
1.6.2.rc0.288.g6852b

^ permalink raw reply related	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2009-02-19  0:48 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-14 19:15 [PATCH 1/4] notes: only clean up message file when editing Thomas Rast
2009-02-14 19:15 ` [PATCH 2/4] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR Thomas Rast
2009-02-14 19:29   ` Johannes Schindelin
2009-02-14 19:15 ` [PATCH 3/4] t3301: fix confusing test for valid notes ref Thomas Rast
2009-02-14 19:32   ` Johannes Schindelin
2009-02-14 19:15 ` [PATCH 4/4] notes: refuse to edit notes outside refs/notes/ Thomas Rast
2009-02-14 19:33   ` Johannes Schindelin
2009-02-14 19:56     ` Thomas Rast
2009-02-14 20:23       ` [PATCH v2 1/5] notes: only clean up message file when editing Thomas Rast
2009-02-15  7:54         ` Junio C Hamano
2009-02-14 20:23       ` [PATCH v2 2/5] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR Thomas Rast
2009-02-14 20:23       ` [PATCH v2 3/5] t3301: fix confusing quoting in test for valid notes ref Thomas Rast
2009-02-14 20:23       ` [PATCH v2 4/5] t3301: use test_must_fail instead of ! Thomas Rast
2009-02-14 21:26         ` Johannes Schindelin
2009-02-15  7:52         ` Junio C Hamano
2009-02-15 16:11           ` Thomas Rast
2009-02-15 18:18             ` Jeff King
2009-02-15 22:07               ` Thomas Rast
2009-02-17  9:29               ` Mike Ralphson
2009-02-17 16:34                 ` Jeff King
2009-02-17 18:00                   ` Mike Ralphson
2009-02-17 20:27                     ` Jeff King
2009-02-18  6:41                       ` Jeff King
2009-02-18 10:14                         ` Johannes Schindelin
2009-02-18 10:16                           ` Jeff King
2009-02-18 11:53                             ` Johannes Schindelin
2009-02-19  0:37                               ` Jeff King
2009-02-19  0:46                                 ` Johannes Schindelin
2009-02-19  0:46                                   ` Jeff King
2009-02-17  8:44           ` Thomas Rast
2009-02-17  8:46             ` Thomas Rast
2009-02-17 16:56               ` Brandon Casey
2009-02-17 22:20                 ` Junio C Hamano
2009-02-17 22:53                   ` [PATCH] test suite: correct export var=val usage Jay Soffian
2009-02-17 23:47                     ` Johannes Schindelin
2009-02-18  0:37                       ` Jay Soffian
2009-02-17 22:54                   ` Jay Soffian
2009-02-17 22:57                   ` Jay Soffian
2009-02-18 10:06                     ` Wincent Colaiuta
2009-02-18 13:19                       ` Jay Soffian
2009-02-18 13:29                         ` Jay Soffian
2009-02-18 13:34                           ` Johannes Schindelin
2009-02-18 16:56                           ` Wincent Colaiuta
2009-02-18 17:05                             ` Thomas Rast
2009-02-18 20:55                   ` [PATCH v2] " Jay Soffian
2009-02-14 20:23       ` [PATCH v2 5/5] notes: refuse to edit notes outside refs/notes/ Thomas Rast
2009-02-14 19:29 ` [PATCH 1/4] notes: only clean up message file when editing Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.