diff options
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -1389,6 +1389,17 @@ sub commit_quilty_patch () { commit_admin "Commit Debian 3.0 (quilt) metadata"; } +sub get_source_format () { + if (!open F, "debian/source/format") { + die $! unless $!==&ENOENT; + return ''; + } + $_ = <F>; + F->error and die $!; + chomp; + return $_; +} + sub madformat ($) { my ($format) = @_; return 0 unless $format eq '3.0 (quilt)'; @@ -1947,14 +1958,8 @@ our $dscfn; our $fakeeditorenv = 'DGIT_FAKE_EDITOR_QUILT'; sub build_maybe_quilt_fixup () { - if (!open F, "debian/source/format") { - die $! unless $!==&ENOENT; - return; - } - $_ = <F>; - F->error and die $!; - chomp; - return unless madformat($_); + my $format=get_source_format; + return unless madformat $format; # sigh my @cmd = (@git, qw(ls-files --exclude-standard -iodm)); |