X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=8df8f761baf9347ce341102b0fd5229aaf4fb03d;hp=e35f1681f387a4b2beeddaf92c5e1d92014dd8e7;hb=86b1bd2035ce1da863c682223893b59ed74962f9;hpb=a8a18c8f483c03492a114aac2be5e89b8f32f5c8 diff --git a/dgit b/dgit index e35f1681..8df8f761 100755 --- a/dgit +++ b/dgit @@ -3817,9 +3817,11 @@ sub pull () { } sub check_not_dirty () { - foreach my $f (qw(local-options local-patch-header)) { - if (stat_exists "debian/source/$f") { - fail f_ "git tree contains debian/source/%s", $f; + my @forbid = qw(local-options local-patch-header); + @forbid = map { "debian/source/$_" } @forbid; + foreach my $f (@forbid) { + if (stat_exists $f) { + fail f_ "git tree contains %s", $f; } } @@ -6603,8 +6605,8 @@ sub build_source { my $mv = sub { my ($why, $l) = @_; printdebug " renaming ($why) $l\n"; - rename "$l", bpd_abs()."/$l" - or fail f_ "put in place new built file (%s): %s", $l, $!; + rename_link_xf 0, "$l", bpd_abs()."/$l" + or fail f_ "put in place new built file (%s): %s", $l, $@; }; foreach my $l (split /\n/, getfield $dsc, 'Files') { $l =~ m/\S+$/ or next; @@ -7376,7 +7378,10 @@ $cmd =~ y/-/_/; my $pre_fn = ${*::}{"pre_$cmd"}; $pre_fn->() if $pre_fn; -record_maindir if $invoked_in_git_tree; +if ($invoked_in_git_tree) { + changedir_git_toplevel(); + record_maindir(); +} git_slurp_config(); my $fn = ${*::}{"cmd_$cmd"};