summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-28 18:33:52 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-02 15:56:56 +0100
commit9ecc454c514558e7d49fa47083a69e456cc33239 (patch)
tree71c7943f04af5c53dcb8375d8db883c82313af30
parent8329968f62aaccced6b1777be64f2286acb50e4e (diff)
Dgit: break must_getcwd out into Dgit.pm
No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--Debian/Dgit.pm8
-rwxr-xr-xdgit6
2 files changed, 7 insertions, 7 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index 399aaad..1d713b9 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -44,7 +44,7 @@ BEGIN {
server_branch server_ref
stat_exists link_ltarget
hashfile
- fail ensuredir executable_on_path
+ fail ensuredir must_getcwd executable_on_path
waitstatusmsg failedcmd_waitstatus
failedcmd_report_cmd failedcmd
runcmd cmdoutput cmdoutput_errok
@@ -224,6 +224,12 @@ sub ensuredir ($) {
die "mkdir $dir: $!";
}
+sub must_getcwd () {
+ my $d = getcwd();
+ defined $d or fail "getcwd failed: $!";
+ return $d;
+}
+
sub executable_on_path ($) {
my ($program) = @_;
return 1 if $program =~ m{/};
diff --git a/dgit b/dgit
index d772a90..6780af7 100755
--- a/dgit
+++ b/dgit
@@ -985,12 +985,6 @@ sub commit_getclogp ($) {
$commit_getclogp_memo{$objid} = parsechangelog("-l$mclog");
}
-sub must_getcwd () {
- my $d = getcwd();
- defined $d or fail "getcwd failed: $!";
- return $d;
-}
-
sub parse_dscdata () {
my $dscfh = new IO::File \$dscdata, '<' or die $!;
printdebug Dumper($dscdata) if $debuglevel>1;