git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git stash: one bug and one feature request
@ 2008-01-04 16:14 Marco Costalba
  2008-01-04 16:36 ` Brandon Casey
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Marco Costalba @ 2008-01-04 16:14 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

Currently git-stash writes to stderr also if there is nothing to error
out, also it would be very nice ;-) if git 'stash clear command' would
support deleting of only one patch, so as example to write

stg stash clear stash@{0}

To remove only the last added.


------------------  cut --------------------------

From: Marco Costalba <mcostalba@gmail.com>
Date: Fri, 4 Jan 2008 17:08:01 +0100
Subject: [PATCH] git-stash: avoid writing to stderr when is not an error

Otherwise git-stash is unusable by scripts that check
stderr to detect fail/success of launched command.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
---
 git-stash.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-stash.sh b/git-stash.sh
index 06cb177..a05a47a 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -86,7 +86,7 @@ save_stash () {

 	if no_changes
 	then
-		echo >&2 'No local changes to save'
+		echo > 'No local changes to save'
 		exit 0
 	fi
 	test -f "$GIT_DIR/logs/$ref_stash" ||
@@ -99,7 +99,7 @@ save_stash () {

 	git update-ref -m "$stash_msg" $ref_stash $w_commit ||
 		die "Cannot save the current status"
-	printf >&2 'Saved working directory and index state "%s"\n' "$stash_msg"
+	printf > 'Saved working directory and index state "%s"\n' "$stash_msg"
 }

 have_stash () {
@@ -229,7 +229,7 @@ create)
 	if test $# -eq 0
 	then
 		save_stash &&
-		echo >&2 '(To restore them type "git stash apply")' &&
+		echo > '(To restore them type "git stash apply")' &&
 		git-reset --hard
 	else
 		usage
-- 
1.5.4.rc2.18.g530e6

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

end of thread, other threads:[~2008-01-05  9:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 16:14 [PATCH] git stash: one bug and one feature request Marco Costalba
2008-01-04 16:36 ` Brandon Casey
2008-01-04 17:30   ` Pascal Obry
2008-01-04 17:51     ` Jakub Narebski
2008-01-04 19:36       ` Brian Swetland
2008-01-04 21:04       ` Jeff King
     [not found]     ` <e5bfff550801040944p7f8e722asfa726b34a4a712fa@mail.gmail.com>
2008-01-04 18:00       ` Brandon Casey
2008-01-04 18:05         ` Marco Costalba
2008-01-04 18:34           ` Brandon Casey
2008-01-04 18:46             ` Marco Costalba
2008-01-05  0:31               ` Junio C Hamano
2008-01-05  0:29 ` Junio C Hamano
2008-01-05  8:25   ` Marco Costalba
2008-01-05  8:36     ` Junio C Hamano
2008-01-05  8:57       ` Marco Costalba
2008-01-05  9:06     ` Junio C Hamano
2008-01-05  6:41 ` Wayne Davison
2008-01-05  6:52   ` Junio C Hamano
2008-01-05  8:31     ` Marco Costalba

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).