summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfixdates.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/fixdates.sh b/fixdates.sh
index fc7f32a..b71a112 100755
--- a/fixdates.sh
+++ b/fixdates.sh
@@ -1,7 +1,7 @@
#!/bin/bash
thisdir="$(cd "$(dirname "$0")";pwd)"
-cd "$thisdir"
+cd "${1:-$thisdir}"
git ls-files -z | \
while read -d $'\0' filename; do
date="$(git log -n 1 --pretty='format:%ct' -- "$filename")"