Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
e046903f
Unverified
Commit
e046903f
authored
5 years ago
by
teor
Browse files
Options
Downloads
Patches
Plain Diff
scripts/git: Restore a dropped check for pre-commit in pre-push
Bugfix on 31919; not in any released version of Tor.
parent
7e73c0d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/git/pre-push.git-hook
+32
-28
32 additions, 28 deletions
scripts/git/pre-push.git-hook
with
32 additions
and
28 deletions
scripts/git/pre-push.git-hook
+
32
−
28
View file @
e046903f
...
...
@@ -58,35 +58,39 @@ do
fi
# Call the pre-commit hook for the common checks, if it is executable
# Only check the files newly modified in this branch
CHECK_FILTER
=
"git diff --name-only --diff-filter=ACMR
$range
"
# Use the appropriate owned tor source list to filter the changed files
if
[
-d
src/lib
]
;
then
# This is the layout in 0.3.5
CHECK_FILES
=
"
$(
$CHECK_FILTER
\
src/lib/
*
/
*
.[ch]
\
src/core/
*
/
*
.[ch]
\
src/feature/
*
/
*
.[ch]
\
src/app/
*
/
*
.[ch]
\
src/test/
*
.[ch]
\
src/test/
*
/
*
.[ch]
\
src/tools/
*
.[ch]
\
)
"
elif
[
-d
src/common
]
;
then
# This was the layout before 0.3.5
CHECK_FILES
=
"
$(
$CHECK_FILTER
\
src/common/
*
/
*
.[ch]
\
src/or/
*
/
*
.[ch]
\
src/test/
*
.[ch]
\
src/test/
*
/
*
.[ch]
\
src/tools/
*
.[ch]
)
"
fi
if
[
-x
scripts/git/pre-commit.git-hook
]
;
then
# Only check the files newly modified in this branch
CHECK_FILTER
=
"git diff --name-only --diff-filter=ACMR
$range
"
# Use the appropriate owned tor source list to filter the changed
# files
if
[
-d
src/lib
]
;
then
# This is the layout in 0.3.5
CHECK_FILES
=
"
$(
$CHECK_FILTER
\
src/lib/
*
/
*
.[ch]
\
src/core/
*
/
*
.[ch]
\
src/feature/
*
/
*
.[ch]
\
src/app/
*
/
*
.[ch]
\
src/test/
*
.[ch]
\
src/test/
*
/
*
.[ch]
\
src/tools/
*
.[ch]
\
)
"
elif
[
-d
src/common
]
;
then
# This was the layout before 0.3.5
CHECK_FILES
=
"
$(
$CHECK_FILTER
\
src/common/
*
/
*
.[ch]
\
src/or/
*
/
*
.[ch]
\
src/test/
*
.[ch]
\
src/test/
*
/
*
.[ch]
\
src/tools/
*
.[ch]
)
"
fi
# We want word splitting here, because file names are space separated
# shellcheck disable=SC2086
if
!
scripts/git/pre-commit.git-hook
$CHECK_FILES
;
then
exit
1
# We want word splitting here, because file names are space
# separated
# shellcheck disable=SC2086
if
!
scripts/git/pre-commit.git-hook
$CHECK_FILES
;
then
exit
1
fi
fi
if
[[
"
$remote_name
"
!=
"
$upstream_name
"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment