]> granicus.if.org Git - strace/commitdiff
build: use more traditional git options
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Nov 2018 01:22:13 +0000 (01:22 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Nov 2018 01:22:13 +0000 (01:22 +0000)
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
file-date-gen

index c35136188b1247c42afa0373352bca91e77cde94..a1883a10a8fa6e69f8b9574a9b4d35337322bacc 100755 (executable)
@@ -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}"
index 6075323e652fbd1f6afe9d6a4f47479b76004739..cc9b1135a8bd8b7de948fb674c1a7ba6601bd1ee 100755 (executable)
@@ -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}"