]> git.phdru.name Git - git-scripts.git/blob - touch-all
3c2b213864d43607afab396d30480aa44e4e1c41
[git-scripts.git] / touch-all
1 #! /bin/sh
2
3 # Recursively find commit date/time for every file in the current directory
4 # and set the file's modification time to that date/time.
5
6 git ls-tree -r --name-only HEAD | while read filename; do
7   touch --date="`git log -1 --format=\"%cD\" -- \"$filename\"`" "$filename"
8 done