The support of --no-patch alias to -s option in "git diff" and related
git commands was added in git v1.8.4.
* copyright-year-gen: Use "git show -s" instead of "git show --no-patch".
* file-date-gen: Use "git log -s" instead of "git log --no-patch".
Closes: https://github.com/strace/strace/issues/80
[ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")"
[ -n "${year}" ] ||
- year="$(date -u +%Y -d "$(git show --format=format:%cD --no-patch)")"
+ year="$(date -u +%Y -d "$(git show -s --format=format:%cD)")"
[ -n "${year}" ] ||
year="${DEFAULT_YEAR}"
[ -f "${DATE_FILE}" ] && date="$(cat "${DATE_FILE}")"
[ -n "${date}" ] ||
- date="$(git log -n 1 --format=format:%cD --no-patch "${FILE}")"
+ date="$(git log -s -n 1 --format=format:%cD "${FILE}")"
[ -n "${date}" ] ||
date="${DEFAULT_DATE}"