summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-08-24 23:40:10 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-08-24 23:40:10 +0100
commit1da531d9d1e1ca779d915b23c1036b41fe8bc6fe (patch)
treed140965e8b033cb9c2e5e2db9b947e2cbae4c7da /dgit
parent4452f1ae2eaba93d2efa884d113f5f7d383f607a (diff)
dry run: Gate two rename calls
These are operating on bpd etc., which they shouldn't with dry run. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit5
1 files changed, 4 insertions, 1 deletions
diff --git a/dgit b/dgit
index e049075..685941b 100755
--- a/dgit
+++ b/dgit
@@ -2555,7 +2555,9 @@ sub generate_commits_from_dsc () {
printdebug "considering saving $f: ";
- if (rename_link_xf 1, $f, $upper_f) {
+ if (!act_local()) {
+ printdebug "no - dry run.\n";
+ } elsif (rename_link_xf 1, $f, $upper_f) {
printdebug "linked.\n";
} elsif ((printdebug "($@) "),
$! != EEXIST) {
@@ -7093,6 +7095,7 @@ sub build_source {
my $mv = sub {
my ($why, $l) = @_;
printdebug " renaming ($why) $l\n";
+ return unless act_local();
rename_link_xf 0, "$l", bpd_abs()."/$l"
or fail f_ "put in place new built file (%s): %s", $l, $@;
};