From: Chris Jones <chris@christopherjones.us>
To: git@vger.kernel.org
Cc: gitster@pobox.com, johannes.schindelin@gmx.de, peff@peff.net
Subject: [PATCH] git-filter-branch.sh: clarify an error message
Date: Sat, 04 Jul 2015 19:39:04 -0400 [thread overview]
Message-ID: <1436053144.3463091.315316457.1BAF8BA7@webmail.messagingengine.com> (raw)
Make git filter-branch output a useful error message when a single
commit is given instead of a range. Currently, when given a command
like git filter-branch --msg-filter 'echo "TEST"' -- abc123, it will
give the message "Which ref do you want to rewrite?". Instead, what
is needed is a range of commits to rewrite. This makes it give an
error message that says "You didn't provide a valid range of
commits".
Signed-off-by: Chris W Jones <chris@christopherjones.us>
---
git-filter-branch.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 5b3f63d..78e7499 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -237,7 +237,7 @@ git rev-parse --no-flags --revs-only
--symbolic-full-name \
sed -e '/^^/d' "$tempdir"/raw-heads >"$tempdir"/heads
test -s "$tempdir"/heads ||
- die "Which ref do you want to rewrite?"
+ die "You didn't provide a valid range of commits."
GIT_INDEX_FILE="$(pwd)/../index"
export GIT_INDEX_FILE
--
1.9.3
next reply other threads:[~2015-07-05 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-04 23:39 Chris Jones [this message]
2015-07-05 13:07 ` [PATCH] git-filter-branch.sh: clarify an error message Jeff King
2015-07-05 14:41 ` Johannes Schindelin
2015-07-11 2:04 ` Chris Jones
2015-07-11 8:16 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436053144.3463091.315316457.1BAF8BA7@webmail.messagingengine.com \
--to=chris@christopherjones.us \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).