[PATCH] git-filter-branch.sh: clarify an error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]