-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11346 from dra27/commit-ignored
CI check for committing files in .gitignore
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
#************************************************************************** | ||
#* * | ||
#* OCaml * | ||
#* * | ||
#* David Allsopp, Tarides * | ||
#* * | ||
#* Copyright 2022 David Allsopp Ltd. * | ||
#* * | ||
#* All rights reserved. This file is distributed under the terms of * | ||
#* the GNU Lesser General Public License version 2.1, with the * | ||
#* special exception on linking described in the file LICENSE. * | ||
#* * | ||
#************************************************************************** | ||
|
||
if git ls-tree HEAD --name-only -r | git check-ignore --stdin --no-index; then | ||
echo These files are matched by .gitignore and should not be committed | ||
exit 1 | ||
fi |