summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTamas Szabo <szabtam@gmail.com>2020-07-25 15:47:04 +0300
committerTamas Szabo <szabtam@gmail.com>2020-07-25 16:06:13 +0300
commit045c0842901d7a1ad49ad18169f075aeffbbe74b (patch)
tree9dcb11870bf6600a8ea9db769b3f64a43631126a /README.md
parent2d76984f1345763f31aff8c1fc940000700cd46e (diff)
downloadisort-045c0842901d7a1ad49ad18169f075aeffbbe74b.tar.gz
Adds lazy option to git hook.
Fixes #1214
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4b7e5582..0ce08a04 100644
--- a/README.md
+++ b/README.md
@@ -526,13 +526,18 @@ include the following in `.git/hooks/pre-commit`:
import sys
from isort.hooks import git_hook
-sys.exit(git_hook(strict=True, modify=True))
+sys.exit(git_hook(strict=True, modify=True, lazy=True))
```
If you just want to display warnings, but allow the commit to happen
anyway, call `git_hook` without the strict parameter. If you want to
display warnings, but not also fix the code, call `git_hook` without the
modify parameter.
+The `lazy` argument is to support users who are "lazy" to add files
+individually to the index and tend to use `git commit -a` instead.
+Set it to `True` to ensure all tracked files are properly isorted,
+leave it out or set it to `False` to check only files added to your
+index.
Setuptools integration
----------------------