pre-commit/pre_commit
Yuri D'Elia 1bf65b37c6 Use os.path.realpath() for path canonicalization
os.getcwd() returns the real path of the current working directory. In
a directory which has been symlinked this does not necessarily match the
same prefix of the current directory.

When os.getcwd() is cd-ed to relativize path names a few lines below
this results in paths which are relative to symlinked tree, not to the
real tree. This makes path rule matches fail.

Use os.path.realpath() when making paths absolute, so that relative
paths refer to the same tree as os.getcwd()
2021-10-02 19:17:35 +02:00
..
commands port hook template to bash 2021-09-27 19:34:04 -04:00
languages add support for dart as a hook language 2021-08-29 08:57:56 -07:00
meta_hooks fix check-useless-excludes for exclude of broken symlink 2021-08-30 20:56:14 -04:00
resources port hook template to bash 2021-09-27 19:34:04 -04:00
__init__.py Initial commit. 2014-03-12 20:25:19 -07:00
__main__.py upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
clientlib.py Add warning for regular expression with [\/] (#2043) 2021-09-22 19:07:38 -04:00
color.py warn on old list-style configuration 2020-07-25 13:04:54 -07:00
constants.py Add: post-rewrite hook support 2021-09-01 14:50:59 -05:00
envcontext.py use slightly simpler enum syntax 2020-11-09 12:29:57 -08:00
error_handler.py Distinct error handling exit codes 2020-10-28 11:13:04 -07:00
errors.py check cygwin mismatch earlier 2020-09-20 10:42:11 -07:00
file_lock.py use comparison with sys.platform so mypy understands it 2021-01-25 12:47:07 -08:00
git.py fix pre-commit autoupdate for core.useBuiltinFSMonitor=true on windows 2021-09-13 20:01:25 -04:00
hook.py add types_or 2020-11-02 17:25:10 +00:00
logging_handler.py Some manual .format() -> f-strings 2020-01-12 13:39:53 -08:00
main.py Use os.path.realpath() for path canonicalization 2021-10-02 19:17:35 +02:00
output.py More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
parse_shebang.py Use covdefaults to handle coveragerc 2020-02-29 14:25:19 -08:00
prefix.py Add types to pre-commit 2020-01-12 10:15:01 -08:00
repository.py produce a more useful error message when non-installable things use language_version or additional_dependencies 2021-01-22 13:56:06 -08:00
staged_files_only.py make sure to not discard changes even if submodule.recurse=1 2021-10-01 18:45:36 -04:00
store.py add support for dart as a hook language 2021-08-29 08:57:56 -07:00
util.py add support for dart as a hook language 2021-08-29 08:57:56 -07:00
xargs.py give xargs batch file execution additional headroom 2021-04-04 10:00:55 -07:00