]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Git hooks: remove support for 0.2.9 directory layout.
authorNick Mathewson <nickm@torproject.org>
Thu, 23 Jan 2020 15:26:09 +0000 (10:26 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 23 Jan 2020 15:28:09 +0000 (10:28 -0500)
We no longer will be pushing or committing things in branches that
use src/common or src/or.

Resolves ticket 32957.

scripts/git/pre-commit.git-hook
scripts/git/pre-push.git-hook

index d5a75f2794a5cb48a6077c02004a42929e52e748..f630a242bd70bfd33e172f2238baff3f931cce97 100755 (executable)
@@ -17,13 +17,14 @@ if [ $# -eq 0 ]; then
     # When called in pre-commit, check the files modified in this commit
     CHECK_FILTER="git diff --cached --name-only --diff-filter=ACMR"
     # 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
-        # Keep these lists consistent:
-        #   - OWNED_TOR_C_FILES in Makefile.am
-        #   - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
-        #   - try_parse in check_cocci_parse.sh
-        CHECK_FILES="$($CHECK_FILTER \
+
+    # This is the layout in 0.3.5 and later.
+
+    # Keep these lists consistent:
+    #   - OWNED_TOR_C_FILES in Makefile.am
+    #   - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
+    #   - try_parse in check_cocci_parse.sh
+    CHECK_FILES="$($CHECK_FILTER \
                            src/lib/*/*.[ch] \
                            src/core/*/*.[ch] \
                            src/feature/*/*.[ch] \
@@ -31,17 +32,7 @@ if [ $# -eq 0 ]; then
                            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
+                  )"
 else
     # When called in pre-push, concatenate the argument array
     # Fails on special characters in file names
index 8b5efb0a9d2e4a49d125a98205cabdf14fd4581e..7b06f3734da8ab50482f417701cc52e489638457 100755 (executable)
@@ -63,13 +63,12 @@ do
             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
-                # Keep these lists consistent:
-                #   - OWNED_TOR_C_FILES in Makefile.am
-                #   - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
-                #   - try_parse in check_cocci_parse.sh
-                CHECK_FILES="$($CHECK_FILTER \
+            # This is the layout in 0.3.5
+            # Keep these lists consistent:
+            #   - OWNED_TOR_C_FILES in Makefile.am
+            #   - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
+            #   - try_parse in check_cocci_parse.sh
+            CHECK_FILES="$($CHECK_FILTER \
                                    src/lib/*/*.[ch] \
                                    src/core/*/*.[ch] \
                                    src/feature/*/*.[ch] \
@@ -77,17 +76,7 @@ do
                                    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