From: Jean-Noel Avila Date: Fri, 12 May 2017 13:03:17 GMT Subject: [PATCH v4 3/3] git-filter-branch: be more direct in an error message Message-ID: <20170512130317.25832-3-jn.avila@free.fr> In-Reply-To: <20170512130317.25832-1-jn.avila@free.fr> git-filter-branch requires the specification of a branch by one way or another. If no branch appears to have been specified, we know the user got the usage wrong but we don't know what they were trying to do --- e.g. maybe they specified the ref to rewrite but in the wrong place. In this case, just state that the branch specification is missing. Signed-off-by: Jean-Noel Avila --- 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 2b8cdba15..aafaf708d 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -239,7 +239,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 must specify a ref to rewrite." GIT_INDEX_FILE="$(pwd)/../index" export GIT_INDEX_FILE -- 2.13.0