mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Screw git hooks
This commit is contained in:
parent
afa8031eec
commit
f1310883b9
2 changed files with 3 additions and 10 deletions
9
Makefile
9
Makefile
|
|
@ -81,7 +81,7 @@ install-test: install-servers
|
||||||
[ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES)
|
[ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES)
|
||||||
|
|
||||||
install-style: install-docs
|
install-style: install-docs
|
||||||
pip install flake8 flake8-import-order 'flake8-bugbear>=17.3.0' autopep8
|
pip install flake8 flake8-import-order 'flake8-bugbear>=17.3.0'
|
||||||
|
|
||||||
style:
|
style:
|
||||||
flake8
|
flake8
|
||||||
|
|
@ -123,13 +123,6 @@ install-dev:
|
||||||
pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \
|
pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install-git-hooks: install-style
|
|
||||||
echo "make style-autocorrect" > .git/hooks/pre-commit
|
|
||||||
chmod +x .git/hooks/pre-commit
|
|
||||||
|
|
||||||
style-autocorrect:
|
|
||||||
git diff --cached --name-only | egrep '\.py$$' | xargs --no-run-if-empty autopep8 -ri
|
|
||||||
|
|
||||||
ssh-submodule-urls:
|
ssh-submodule-urls:
|
||||||
git submodule foreach "\
|
git submodule foreach "\
|
||||||
echo -n 'Old: '; \
|
echo -n 'Old: '; \
|
||||||
|
|
|
||||||
|
|
@ -129,9 +129,9 @@ def sync(storage_a, storage_b, status, conflict_resolution=None,
|
||||||
raise BothReadOnly()
|
raise BothReadOnly()
|
||||||
|
|
||||||
if conflict_resolution == 'a wins':
|
if conflict_resolution == 'a wins':
|
||||||
def conflict_resolution(a, b): return a
|
conflict_resolution = lambda a, b: a
|
||||||
elif conflict_resolution == 'b wins':
|
elif conflict_resolution == 'b wins':
|
||||||
def conflict_resolution(a, b): return b
|
conflict_resolution = lambda a, b: b
|
||||||
|
|
||||||
status_nonempty = bool(next(status.iter_old(), None))
|
status_nonempty = bool(next(status.iter_old(), None))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue