git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-filter-branch.sh: clarify an error message
@ 2015-07-04 23:39 Chris Jones
  2015-07-05 13:07 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Jones @ 2015-07-04 23:39 UTC (permalink / raw)
  To: git; +Cc: gitster, johannes.schindelin, peff

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

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

end of thread, other threads:[~2015-07-11  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-04 23:39 [PATCH] git-filter-branch.sh: clarify an error message Chris Jones
2015-07-05 13:07 ` Jeff King
2015-07-05 14:41   ` Johannes Schindelin
2015-07-11  2:04     ` Chris Jones
2015-07-11  8:16       ` Johannes Schindelin

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