new_branch="$3"
if [ "$new_branch" = 1 ]; then
- commit_date="`git show --format='%cD' \"$new_HEAD\" | awk '{if (NR==1) print}'`" &&
+ commit_date="`git show --format='%cD' \"$new_HEAD\" | head -1`" &&
touch --date="$commit_date" `git ls-files --cached`
fi
new_branch="$3"
if [ "$new_branch" = 1 ]; then
- commit_date="`git show --format='%cD' \"$new_HEAD\" | awk '{if (NR==1) print}'`" &&
+ commit_date="`git show --format='%cD' \"$new_HEAD\" | head -1`" &&
find . \( -name .git -type d -prune \) -o -exec touch --date="$commit_date" '{}' \+
fi