diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-11-10 12:40:38 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-11-10 12:41:54 +0000 |
commit | 6d5e571edcc9f42a013e8c0bb8d01173d7feac2f (patch) | |
tree | 7169e9e5b25e33ee12edf2dc487cd3a4f00febfe | |
parent | 6b61358cc8783b17c44a9d3ca1bdb18809e9f345 (diff) |
dgit: Don't rebind date
This generates a warning
"my" variable $date masks earlier declaration in same scope at /home/ian/things/Dgit/dgit/dgit line 2190.
Possibly we should disable this warning, but it might be saving us
from other kinds of bugs. (In Rust where I have gained this rebinding
habit, the type system will generally spot mistakes.)
Closes: #1055528
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | dgit | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2185,7 +2185,7 @@ sub clogp_authline ($) { my $date = getfield($clogp,'Date'); # try to pass through the changelog entry's timezone offset my $tz = $date =~ m{ ([-+]\d{4})$} ? $1 : " +0000"; - my $date = cmdoutput qw(date), '+%s', qw(-d), $date; + $date = cmdoutput qw(date), '+%s', qw(-d), $date; my $authline = "$author $date $tz"; $authline =~ m/$git_authline_re/o or fail f_ "unexpected commit author line format \`%s'". |