From: Floyd Anderson Date: Mon, 26 Mar 2018 18:14:41 +0000 (+0200) Subject: auto.def: Simplify PACKAGE_VERSION fallback case X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38e2f679077bb596e11ac9b4c004ca1446d4eb5d;p=neomutt auto.def: Simplify PACKAGE_VERSION fallback case get-author-date() procedure: Assuming definition of PACKAGE_VERSION and its format never change, allows a code simplification for parsing the value as date. --- diff --git a/auto.def b/auto.def index e8641e9db..998e7b96e 100644 --- a/auto.def +++ b/auto.def @@ -188,16 +188,11 @@ if {1} { gets $fd epoch close $fd}] || $epoch eq "" } { - #user-notice "No author timestamp found, falling back to PACKAGE_VERSION..." - if {[catch {clock scan [get-define PACKAGE_VERSION] \ - -format {%Y%m%d} -timezone :UTC} epoch] - } { - autosetup-error "Cannot get or parse PACKAGE_VERSION as date!" - } + set epoch [clock scan \ + [get-define PACKAGE_VERSION] -format {%Y%m%d} -timezone :UTC] } cd $oldpwd - return [clock format $epoch -format $format -timezone :UTC] } }