We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b215c40 commit fff499bCopy full SHA for fff499b
1 file changed
tools/git/hooks/pre-push
@@ -40,6 +40,9 @@ url="$2"
40
# Determine the current branch:
41
export GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD)
42
43
+# Determine root directory:
44
+root=$(git rev-parse --show-toplevel)
45
+
46
47
# FUNCTIONS #
48
@@ -105,7 +108,7 @@ main() {
105
108
fi
106
109
107
110
# Get the set of changed files (added and modified):
- changed_files=$(git diff --name-only --diff-filter AM "${remote}/${GIT_CURRENT_BRANCH}")
111
+ changed_files=$(git diff --name-only --diff-filter AM "${remote}/${GIT_CURRENT_BRANCH}" | sed -e "s#^#${root}\/#")
112
113
# Run JavaScript example files:
114
files=$(echo "${changed_files}" | grep '/examples/.*\.js$' | grep -v '/examples/fixtures/.*\.js$' | tr '\n' ' ')
0 commit comments