From: "Marco Costalba" <mcostalba@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: [PATCH] git stash: one bug and one feature request
Date: Fri, 4 Jan 2008 17:14:42 +0100 [thread overview]
Message-ID: <e5bfff550801040814n82f34b2g17c485a207093440@mail.gmail.com> (raw)
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
next reply other threads:[~2008-01-04 16:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 16:14 Marco Costalba [this message]
2008-01-04 16:36 ` [PATCH] git stash: one bug and one feature request 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
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=e5bfff550801040814n82f34b2g17c485a207093440@mail.gmail.com \
--to=mcostalba@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).