Skip to content

Commit 6963893

Browse files
jnavilagitster
authored andcommitted
git-filter-branch: be more direct in an error message
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9932242 commit 6963893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-filter-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ git rev-parse --no-flags --revs-only --symbolic-full-name \
239239
sed -e '/^^/d' "$tempdir"/raw-heads >"$tempdir"/heads
240240

241241
test -s "$tempdir"/heads ||
242-
die "Which ref do you want to rewrite?"
242+
die "You must specify a ref to rewrite."
243243

244244
GIT_INDEX_FILE="$(pwd)/../index"
245245
export GIT_INDEX_FILE

0 commit comments

Comments
 (0)