Skip to content

Commit

Permalink
git-filter-branch: be more direct in an error message
Browse files Browse the repository at this point in the history
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 <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
jnavila authored and gitster committed May 12, 2017
1 parent 9932242 commit 6963893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-filter-branch.sh
Expand Up @@ -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
Expand Down

0 comments on commit 6963893

Please sign in to comment.