From 1675ca4721614067f8ad493d6958e2ea1d8a51e0 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 19 Nov 2013 12:55:24 +0000 Subject: make output a bit more stable --- fixdates.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 fixdates.sh (limited to 'fixdates.sh') diff --git a/fixdates.sh b/fixdates.sh new file mode 100755 index 0000000..fc7f32a --- /dev/null +++ b/fixdates.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +thisdir="$(cd "$(dirname "$0")";pwd)" +cd "$thisdir" +git ls-files -z | \ +while read -d $'\0' filename; do + date="$(git log -n 1 --pretty='format:%ct' -- "$filename")" + if [[ -n "$date" ]]; then + echo "updating <$filename> to date <$date>" + touch -d @"$date" "$filename" + fi +done -- cgit v1.2.3