summaryrefslogtreecommitdiff
path: root/util/lint/lint-extended-020-signed-off-by
diff options
context:
space:
mode:
Diffstat (limited to 'util/lint/lint-extended-020-signed-off-by')
-rwxr-xr-xutil/lint/lint-extended-020-signed-off-by4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/lint/lint-extended-020-signed-off-by b/util/lint/lint-extended-020-signed-off-by
index 40b6e9eb42..065b286d34 100755
--- a/util/lint/lint-extended-020-signed-off-by
+++ b/util/lint/lint-extended-020-signed-off-by
@@ -16,7 +16,9 @@
# DESCR: Check for a signed-off-by line on the latest git commit
# This test is mainly for the jenkins server
-if [ -n "$(command -v git)" ] && [ -d .git ]; then
+if [ -n "$(command -v git)" ] && \
+ [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
+then
if [ -z "$(git log -n 1 | grep '[[:space:]]\+Signed-off-by: ')" ]; then
echo "No Signed-off-by line in commit message"
fi