X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=dgit;h=e02a6bd267fc506b224c9abb2db9f6aa7b9749e1;hb=6747e1e6b33857b9cc9d1051c5bbee087ccf833e;hp=7b62a66f3a1279f4710fae3e9f5db1e1e77c35b6;hpb=1f5c524bee32ddf33bf5e4d6a293d3cc27f59e22;p=dgit.git diff --git a/dgit b/dgit index 7b62a66f..e02a6bd2 100755 --- a/dgit +++ b/dgit @@ -1751,7 +1751,14 @@ sub pull () { } sub check_not_dirty () { + foreach my $f (qw(local-options local-patch-header)) { + if (stat_exists "debian/source/$f") { + fail "git tree contains debian/source/$f"; + } + } + return if $ignoredirty; + my @cmd = (@git, qw(diff --quiet HEAD)); debugcmd "+",@cmd; $!=0; $?=0; system @cmd; @@ -1761,12 +1768,6 @@ sub check_not_dirty () { } else { failedcmd @cmd; } - - foreach my $f (qw(local-options local-patch-header)) { - if (stat_exists "debian/source/$f") { - fail "git tree contains debian/source/$f"; - } - } } sub commit_admin ($) { @@ -3139,7 +3140,7 @@ sub cmd_sbuild { unlink $cf or fail "remove $cf: $!"; } } - runcmd_ordryrun_local @sbuild, @ARGV, qw(-d), $isuite, $dscfn; + runcmd_ordryrun_local @sbuild, qw(-d), $isuite, @ARGV, $dscfn; my @changesfiles = glob $pat; @changesfiles = sort { ($b =~ m/_source\.changes$/ <=> $a =~ m/_source\.changes$/) @@ -3160,6 +3161,8 @@ sub cmd_quilt_fixup { my $clogp = parsechangelog(); $version = getfield $clogp, 'Version'; $package = getfield $clogp, 'Source'; + check_not_dirty(); + clean_tree(); build_maybe_quilt_fixup(); }