chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide --force-unrepresentable.
[dgit.git]
/
Debian
/
Dgit.pm
diff --git
a/Debian/Dgit.pm
b/Debian/Dgit.pm
index 5c43f0257b82860f0e6cff3e7d85040c144cd8df..6854a7cffd74dff3ae7a7d236d41cb5c42fc4088 100644
(file)
--- a/
Debian/Dgit.pm
+++ b/
Debian/Dgit.pm
@@
-41,7
+41,7
@@
BEGIN {
stat_exists link_ltarget
hashfile
fail ensuredir executable_on_path
stat_exists link_ltarget
hashfile
fail ensuredir executable_on_path
- waitstatusmsg failedcmd
+ waitstatusmsg failedcmd
_report_cmd failedcmd
cmdoutput cmdoutput_errok
git_rev_parse git_get_ref git_for_each_ref
git_for_each_tag_referring is_fast_fwd
cmdoutput cmdoutput_errok
git_rev_parse git_get_ref git_for_each_ref
git_for_each_tag_referring is_fast_fwd
@@
-217,6
+217,12
@@
sub waitstatusmsg () {
}
}
}
}
+sub failedcmd_report_cmd {
+ my $intro = shift @_;
+ $intro //= "failed command";
+ { local ($!); printcmd \*STDERR, _us().": $intro:", @_ or die $!; };
+}
+
sub failedcmd {
# Expects $!,$? as set by close - see below.
# To use with system(), set $?=-1 first.
sub failedcmd {
# Expects $!,$? as set by close - see below.
# To use with system(), set $?=-1 first.
@@
-229,7
+235,7
@@
sub failedcmd {
# success trashed $?==0 system
# program failed trashed $? >0 system
# syscall failure $! >0 unchanged system
# success trashed $?==0 system
# program failed trashed $? >0 system
# syscall failure $! >0 unchanged system
-
{ local ($!); printcmd \*STDERR, _us().": failed command:", @_ or die $!; }
;
+
failedcmd_report_cmd undef, @_
;
if ($? < 0) {
fail "failed to fork/exec: $!";
} elsif ($?) {
if ($? < 0) {
fail "failed to fork/exec: $!";
} elsif ($?) {