chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ece82c5
)
Break out get_source_format (nfc)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 27 Oct 2014 17:46:11 +0000
(17:46 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 8 Nov 2014 16:07:56 +0000
(16:07 +0000)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index 9d8f9d428e4f6752fe247ecc2133f91b0b47e9b0..d00ab1f04fc7d61b69f10d03cf0dbf1f18628771 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-1389,6
+1389,17
@@
sub commit_quilty_patch () {
commit_admin "Commit Debian 3.0 (quilt) metadata";
}
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)';
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 () {
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));
# sigh
my @cmd = (@git, qw(ls-files --exclude-standard -iodm));