# Read .git/FETCH_HEAD and make a human readable merge message
# by grouping branches and tags together to form a single line.
+unshift @INC, '@@INSTLIBDIR@@';
use strict;
use Git;
+use Error qw(:try);
my $repo = Git->repository();
}
sub repoconfig {
- my ($val) = $repo->command_oneline('repo-config', '--get', 'merge.summary');
+ my $val;
+ try {
+ $val = $repo->command_oneline('repo-config', '--get', 'merge.summary');
+ } catch Git::Error::Command with {
+ my ($E) = shift;
+ if ($E->value() == 1) {
+ return undef;
+ } else {
+ throw $E;
+ }
+ };
return $val;
}