summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-09-02 11:27:11 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-09-02 11:43:42 +0100
commit332d678a9f20c7d805cd12df309226abac759e42 (patch)
tree865505b8cf1f49bb25dc0be32aaf947dfd370e56 /dgit
parent82073545960c59404d32ee383f83d94e3dbfb4e8 (diff)
get_source_format: Allow callers to just get the format, not options
Use wantarray to distinguish the cases. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit2
1 files changed, 1 insertions, 1 deletions
diff --git a/dgit b/dgit
index ec0f6ce..5c672a0 100755
--- a/dgit
+++ b/dgit
@@ -4175,7 +4175,7 @@ sub get_source_format () {
F->error and confess "$!";
close F;
chomp;
- return ($_, \%options);
+ return wantarray ? ($_, \%options) : $_;
}
sub madformat_wantfixup ($) {