summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-11-10 12:40:38 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-11-10 12:41:54 +0000
commit6d5e571edcc9f42a013e8c0bb8d01173d7feac2f (patch)
tree7169e9e5b25e33ee12edf2dc487cd3a4f00febfe
parent6b61358cc8783b17c44a9d3ca1bdb18809e9f345 (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-xdgit2
1 files changed, 1 insertions, 1 deletions
diff --git a/dgit b/dgit
index 6357593..d768827 100755
--- a/dgit
+++ b/dgit
@@ -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'".