Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git-mtime: set the mtime of all files to their last commit time

  • Loading branch information...
commit 3616da4b18e0d87dda3b63572bda3cb0f4d04e32 1 parent 333bea1
@book authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 git-mtime
View
4 git-mtime
@@ -0,0 +1,4 @@
+#!/bin/sh
+git log --name-only --date=iso --reverse --pretty=format:%at "$@"\
+| perl -00ln -e '($d,@f)=split/\n/;$d{$_}=$d for grep{-e}@f' \
+ -e '}{utime undef,$d{$_},$_ for keys%d'
Please sign in to comment.
Something went wrong with that request. Please try again.