# [PATCH] git-svn: call 'fatal' correctly in set-tree

2 messages from 2008-09-29 to 2008-10-12. Participants: Luc Heinrich, Junio C Hamano.
Thread: https://gitlist.dev/t/15703

## Luc Heinrich, 2008-09-29 13:58

Subject: [PATCH] git-svn: call 'fatal' correctly in set-tree
Message-ID: <1222696698-97356-1-git-send-email-luc@honk-honk.com>
URL: https://gitlist.dev/e/1222696698-97356-1-git-send-email-luc%40honk-honk.com

```
When doing a set-tree and there is no revision to commit to, the following unrelated error message is displayed: "Undefined subroutine &Git::SVN::fatal called at /opt/local/libexec/git-core/git-svn line 2575." The following patch fixes the problem and allows the real error message to be shown.

Signed-off-by: Luc Heinrich <luc@honk-honk.com>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 80a5728..7609a83 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2591,7 +2591,7 @@ sub set_tree {
 	my ($self, $tree) = (shift, shift);
 	my $log_entry = ::get_commit_entry($tree);
 	unless ($self->{last_rev}) {
-		fatal("Must have an existing revision to commit");
+		::fatal("Must have an existing revision to commit");
 	}
 	my %ed_opts = ( r => $self->{last_rev},
 	                log => $log_entry->{log},
-- 
1.6.0.2

```

## Junio C Hamano, 2008-10-12 05:34

Subject: Re: [PATCH] git-svn: call 'fatal' correctly in set-tree
Message-ID: <7v63nyidgx.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v63nyidgx.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1222696698-97356-1-git-send-email-luc@honk-honk.com>

```
Luc Heinrich <luc@honk-honk.com> writes:

> When doing a set-tree and there is no revision to commit to, the
> following unrelated error message is displayed: "Undefined subroutine
> &Git::SVN::fatal called at /opt/local/libexec/git-core/git-svn line
> 2575." The following patch fixes the problem and allows the real error
> message to be shown.
>
> Signed-off-by: Luc Heinrich <luc@honk-honk.com>
> ---
>  git-svn.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-svn.perl b/git-svn.perl
> index 80a5728..7609a83 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -2591,7 +2591,7 @@ sub set_tree {
>  	my ($self, $tree) = (shift, shift);
>  	my $log_entry = ::get_commit_entry($tree);
>  	unless ($self->{last_rev}) {
> -		fatal("Must have an existing revision to commit");
> +		::fatal("Must have an existing revision to commit");
>  	}
>  	my %ed_opts = ( r => $self->{last_rev},
>  	                log => $log_entry->{log},

Shouldn't the same change be done for the fatal call from apply_diff in
SVN::Git::Editor package?

```
