summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-10-29 13:33:27 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-10-29 15:03:58 +0000
commitd16d864c43284433a2c45fb2567c6e111b6012ea (patch)
tree306607f17e89e380af0820feefccc7991133b2da
parent56ffa6a7de9cc41a72a309ea8c7308a41e61fc04 (diff)
clogp_authline: Break out Date field handling
Code motion. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit3
1 files changed, 2 insertions, 1 deletions
diff --git a/dgit b/dgit
index 122651d..fab4e7e 100755
--- a/dgit
+++ b/dgit
@@ -2182,7 +2182,8 @@ sub clogp_authline ($) {
# are by now preceded by @ (or "). It seems safer to punt on
# "..." for now rather than attempting to dequote or something.
$author =~ s#,.*##ms unless $author =~ m/"/;
- my $date = cmdoutput qw(date), '+%s %z', qw(-d), getfield($clogp,'Date');
+ my $date = getfield($clogp,'Date');
+ my $date = cmdoutput qw(date), '+%s %z', qw(-d), $date;
my $authline = "$author $date";
$authline =~ m/$git_authline_re/o or
fail f_ "unexpected commit author line format \`%s'".