threads / patch / 17892

patch, 6 partsImprove error message for git-filter-branch

Subject: [PATCH 4/6] Improve error message for git-filter-branch

## tl;dr

5 messages between Feb 19, 2009 and Feb 19, 2009. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

John Tapsell· Feb 19, 2009, 07:36 UTC · lore
Tell the user that a backup (original) already exists, and how to solve
this problem (with -f option)
---
 git-filter-branch.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to git-filter-branch.sh +2 −1
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 27b57b8..1ca45e2 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -226,7 +226,8 @@ while read sha1 type name
 do
 	case "$force,$name" in
 	,$orig_namespace*)
-		die "Namespace $orig_namespace not empty"
+		die "Cannot backup - a previous backup already exists in $orig_namespace\n" \
+		    "Force overwriting the backup with -f"
 	;;
 	t,$orig_namespace*)
 		git update-ref -d "$name" $sha1
-- 
1.6.2.rc1.3.g7d31b.dirty
Sverre Rabbelier· Feb 19, 2009, 08:44 UTC · re: John Tapsell · lore

Re: [PATCH 4/6] Improve error message for git-filter-branch

Heya,
On Thu, Feb 19, 2009 at 08:36, John Tapsell <johnflux@gmail.com> wrote:
> Tell the user that a backup (original) already exists, and how to solve
> this problem (with -f option)

Very helpful, I like it :)! Although perhaps s/Cannot backup/Cannot create a new backup/ ?

-- 
Cheers,

Sverre Rabbelier
John Tapsell· Feb 19, 2009, 14:19 UTC · re: John Tapsell · lore

Re: [PATCH 4/6] Improve error message for git-filter-branch

2009/2/19 John Tapsell <johnflux@gmail.com>:
> Tell the user that a backup (original) already exists, and how to solve
> this problem (with -f option)
"Oh, and also all are:
Signed-off-by: John Tapsell <johnflux@gmail.com>"
Show 23 quoted lines
> ---
>  git-filter-branch.sh |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/git-filter-branch.sh b/git-filter-branch.sh
> index 27b57b8..1ca45e2 100755
> --- a/git-filter-branch.sh
> +++ b/git-filter-branch.sh
> @@ -226,7 +226,8 @@ while read sha1 type name
>  do
>        case "$force,$name" in
>        ,$orig_namespace*)
> -               die "Namespace $orig_namespace not empty"
> +               die "Cannot backup - a previous backup already exists in $orig_namespace\n" \
> +                   "Force overwriting the backup with -f"
>        ;;
>        t,$orig_namespace*)
>                git update-ref -d "$name" $sha1
> --
> 1.6.2.rc1.3.g7d31b.dirty
>
>
>
Johannes Schindelin· Feb 19, 2009, 15:03 UTC · re: John Tapsell · lore

Re: [PATCH 4/6] Improve error message for git-filter-branch

Hi,
On Thu, 19 Feb 2009, John Tapsell wrote:
Show 7 quoted lines
> 2009/2/19 John Tapsell <johnflux@gmail.com>:
> > Tell the user that a backup (original) already exists, and how to solve
> > this problem (with -f option)
> 
> 
> "Oh, and also all are:
> Signed-off-by: John Tapsell <johnflux@gmail.com>"
Might be nice to resend it so that the maintainer has less work, no?

Also might be nice to cut the complete crap after the only piece of information in your mail:

Show 29 quoted lines
> 
> > ---
> >  git-filter-branch.sh |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/git-filter-branch.sh b/git-filter-branch.sh
> > index 27b57b8..1ca45e2 100755
> > --- a/git-filter-branch.sh
> > +++ b/git-filter-branch.sh
> > @@ -226,7 +226,8 @@ while read sha1 type name
> >  do
> >        case "$force,$name" in
> >        ,$orig_namespace*)
> > -               die "Namespace $orig_namespace not empty"
> > +               die "Cannot backup - a previous backup already exists in $orig_namespace\n" \
> > +                   "Force overwriting the backup with -f"
> >        ;;
> >        t,$orig_namespace*)
> >                git update-ref -d "$name" $sha1
> > --
> > 1.6.2.rc1.3.g7d31b.dirty
> >
> >
> >
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Sverre Rabbelier· Feb 19, 2009, 15:13 UTC · re: Johannes Schindelin · lore

Re: [PATCH 4/6] Improve error message for git-filter-branch

On Thu, Feb 19, 2009 at 16:03, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> Might be nice to resend it so that the maintainer has less work, no?

Junio said it was ok to ask him to forge and fixup if desired in the other thread.

> Also might be nice to cut the complete crap after the only piece of
> information in your mail:
Somehow you failed to do so yourself ;).
-- 
Cheers,

Sverre Rabbelier

← back to recent threads