This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository pkg-perl-tools.

commit 9ce55085557d514f783fcd718133b38eade31e0d
Author: gregor herrmann <gre...@debian.org>
Date:   Tue Jun 28 21:43:10 2016 +0200

    patchedit: always set Last-Update to the mtime of the patch file
    
    when in fix mode.
---
 bin/patchedit | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/patchedit b/bin/patchedit
index 494f83f..d309e14 100755
--- a/bin/patchedit
+++ b/bin/patchedit
@@ -192,8 +192,10 @@ sub fix_patch {
         $patch_content->{'Reviewed-by'} ||= "$author\n"
             unless $patch_content->{'Reviewed-by'}
             || $patch_content->{'Acked-by'};
+        # stat[9] = mtime
         $patch_content->{'Last-Update'}
-            ||= DateTime->now->set_time_zone('local')->strftime('%Y-%m-%d')
+            = DateTime->from_epoch( epoch => ( stat($patch) )[9] )
+            ->set_time_zone('local')->strftime('%Y-%m-%d')
             . "\n";
         $patch_content->{'Applied-Upstream'} ||= "*** FIXME ***\n";
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to