]> OCCT Git - occt.git/commitdiff
Configuration, gitignore - Ignore all at root except explicit allowlist (#787)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sat, 1 Nov 2025 19:52:20 +0000 (19:52 +0000)
committerGitHub <noreply@github.com>
Sat, 1 Nov 2025 19:52:20 +0000 (19:52 +0000)
Add single-level rules to ignore everything at the repository root while whitelisting
essential config files and directories. Explicitly allow selected data subdirectories
and top-level src modules, and preserve deeper-level ignore rules.

.gitignore

index f995bd0ba669aab1d440d7186303ea135ab74968..e255c8c4f1e198d5a390ef842ca6e995ee9977ef 100644 (file)
@@ -1,3 +1,52 @@
+# ============================================================================
+# SINGLE-LEVEL RESTRICTIONS: Only accept what's already tracked in git
+# (These rules apply only at the specified level, deeper levels follow rules below)
+# ============================================================================
+
+# Root level: Ignore everything except tracked items
+/*
+!/.clang-format
+!/.git-blame-ignore-revs
+!/.gitattributes
+!/.gitignore
+!/.tgitconfig
+!/CMakeLists.txt
+!/LICENSE_LGPL_21.txt
+!/OCCT_LGPL_EXCEPTION.txt
+!/README.md
+!/adm/
+!/cmake/
+!/data/
+!/dox/
+!/samples/
+!/src/
+!/tests/
+!/tools/
+!/.github/
+
+# data/ level: Ignore everything except tracked subdirectories
+/data/*
+!/data/iges/
+!/data/images/
+!/data/occ/
+!/data/step/
+!/data/stl/
+!/data/vrml/
+
+# src/ level: Ignore everything except tracked items
+/src/*
+!/src/MODULES.cmake
+!/src/ApplicationFramework/
+!/src/DataExchange/
+!/src/Draw/
+!/src/FoundationClasses/
+!/src/ModelingAlgorithms/
+!/src/ModelingData/
+!/src/Visualization/
+
+# ============================================================================
+# DEEPER LEVEL RULES (applied recursively within allowed directories above)
+# ============================================================================
 
 # standard directories for derived files in CASROOT
 /.adm