From c4c993b642a205c5a485c23daec5cf957c17c54a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 24 Nov 2018 01:22:13 +0000 Subject: [PATCH] build: use more traditional git options 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 --- copyright-year-gen | 2 +- file-date-gen | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/copyright-year-gen b/copyright-year-gen index c3513618..a1883a10 100755 --- a/copyright-year-gen +++ b/copyright-year-gen @@ -14,7 +14,7 @@ year= [ -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}" diff --git a/file-date-gen b/file-date-gen index 6075323e..cc9b1135 100755 --- a/file-date-gen +++ b/file-date-gen @@ -22,7 +22,7 @@ date= [ -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}" -- 2.40.0