Re: [PATCH 4/4] git-filter-branch: be assertative on dying message

2017-05-03 Thread Jonathan Nieder
Hi,

Jean-Noel Avila wrote:

> Signed-off-by: Jean-Noel Avila 

As with the previous patches, this is a good place to put the motivation
for the patch.

> ---
>  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..dd3a605d0 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"

I find both the old and the new messages pretty uncompelling.  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.

Would e.g. a simple call to 'usage' work?

Thanks,
Jonathan


[PATCH 4/4] git-filter-branch: be assertative on dying message

2017-05-03 Thread Jean-Noel Avila
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..dd3a605d0 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.12.0