From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: git-whatchanged: exit out early on errors
Date: Wed, 25 Jan 2006 17:02:10 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0601251700540.2644@evo.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601251655580.2644@evo.osdl.org>
If we get an error parsing the arguments, exit.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
This goes together with the previous diff - it just makes git-whatchanged
exit gracefully when git-rev-parse errors out.
diff --git a/git-whatchanged.sh b/git-whatchanged.sh
index 80e2500..d4f985b 100755
--- a/git-whatchanged.sh
+++ b/git-whatchanged.sh
@@ -4,7 +4,7 @@ USAGE='[-p] [--max-count=<n>] [<since>..
SUBDIRECTORY_OK='Yes'
. git-sh-setup
-diff_tree_flags=$(git-rev-parse --sq --no-revs --flags "$@")
+diff_tree_flags=$(git-rev-parse --sq --no-revs --flags "$@") || exit
test -z "$diff_tree_flags" &&
diff_tree_flags=$(git-repo-config --get whatchanged.difftree)
test -z "$diff_tree_flags" &&
next prev parent reply other threads:[~2006-01-25 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-25 22:00 Make git-rev-list and git-rev-parse argument parsing stricter Linus Torvalds
2006-01-25 22:02 ` Linus Torvalds [this message]
2006-01-25 22:40 ` Junio C Hamano
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=Pine.LNX.4.64.0601251700540.2644@evo.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).