git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git stash: one bug and one feature request

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Jan 5, 2008, 08:57 UTC
Message-ID
<e5bfff550801050057v485a7491qa8997b5b9c3b0f60@mail.gmail.com>
In-Reply-To
<7vbq80d5yp.fsf@gitster.siamese.dyndns.org>
On Jan 5, 2008 9:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>
> IOW, I do have much less objections to what your patch actually
> does, than I have problems with the way the reason for the
> change is stated.  The change is not fixing anything to conform
> to some standard behaviour.  It is more about bending
> (admittedly only slightly) backwards to help broken callers.
> That is what I have most trouble with.
>
>
Thanks for your understanding.
--------------------- CUT -----------------------------------
Subject: [PATCH] git-stash: use stdout instead of stderr for not error messages

Some scripts/libraries commonly check stderr to detect a failing command. This is not standard nor good behaviour but is quite common and in this case the change does not seem to hurt.

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..4d5e5c0 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-dirty
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 19 in “git stash: one bug and one feature request”
  1. git stash: one bug and one feature requestMarco Costalba, Jan 4, 2008
  2. Brandon CaseyJan 4, 2008
  3. Pascal ObryJan 4, 2008
  4. Jakub NarebskiJan 4, 2008
  5. Brian SwetlandJan 4, 2008
  6. Jeff KingJan 4, 2008
  7. Junio C HamanoJan 5, 2008
  8. Marco CostalbaJan 5, 2008
  9. Junio C HamanoJan 5, 2008
  10. Marco CostalbaJan 5, 2008
  11. Junio C HamanoJan 5, 2008
  12. Wayne DavisonJan 5, 2008
  13. Junio C HamanoJan 5, 2008
  14. Marco CostalbaJan 5, 2008
  15. Brandon CaseyJan 4, 2008
  16. Marco CostalbaJan 4, 2008
  17. Brandon CaseyJan 4, 2008
  18. Marco CostalbaJan 4, 2008
  19. Junio C HamanoJan 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.