From: Ian Jackson Date: Wed, 18 Jan 2017 21:30:56 +0000 (+0000) Subject: dgit: git_get_config: Use confess, not croak X-Git-Tag: archive/debian/3.6~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=76e5c4414c5d0ecd5efdd55c6e93290763873eff dgit: git_get_config: Use confess, not croak Using croak was simply a mistake. I always wanted a stack trace. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 7c2faacc..d334b397 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,8 @@ dgit (3.6~) unstable; urgency=medium Minor improvements: - * Call `confess' to print a stack trace when we pass undef to - shellquote (eg as a result of debugcmd). Turns an undefined - warning into an explicit internal error. + * Use `confess' to print a stack trace in a couple of internal error + rcases. -- diff --git a/dgit b/dgit index eb42b00d..4f85e5c1 100755 --- a/dgit +++ b/dgit @@ -669,7 +669,7 @@ sub git_get_config ($) { my ($c) = @_; foreach my $src (@gitcfgsources) { my $l = $gitcfgs{$src}{$c}; - croak "$l $c" if $l && !ref $l; + confess "internal error ($l $c)" if $l && !ref $l; printdebug"C $c ".(defined $l ? join " ", map { messagequote "'$_'" } @$l : "undef")."\n"