mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove --unshallow fetch from travis-ci config
This commit is contained in:
parent
3e507bf8bd
commit
68ce070b65
2 changed files with 10 additions and 9 deletions
|
|
@ -16,8 +16,6 @@ matrix:
|
||||||
install: pip install coveralls tox
|
install: pip install coveralls tox
|
||||||
script: tox
|
script: tox
|
||||||
before_install:
|
before_install:
|
||||||
# Our tests inspect some of *our* git history
|
|
||||||
- git fetch --unshallow
|
|
||||||
- git --version
|
- git --version
|
||||||
- |
|
- |
|
||||||
if [ "$LATEST_GIT" = "1" ]; then
|
if [ "$LATEST_GIT" = "1" ]; then
|
||||||
|
|
|
||||||
|
|
@ -165,15 +165,18 @@ def test_parse_merge_msg_for_conflicts(input, expected_output):
|
||||||
assert ret == expected_output
|
assert ret == expected_output
|
||||||
|
|
||||||
|
|
||||||
def test_get_changed_files():
|
def test_get_changed_files(in_tmpdir):
|
||||||
files = git.get_changed_files(
|
cmd_output('git', 'init', '.')
|
||||||
'78c682a1d13ba20e7cb735313b9314a74365cd3a',
|
cmd_output('git', 'commit', '--allow-empty', '-m', 'initial commit')
|
||||||
'3387edbb1288a580b37fe25225aa0b856b18ad1a',
|
open('a.txt', 'a').close()
|
||||||
)
|
open('b.txt', 'a').close()
|
||||||
assert files == ['CHANGELOG.md', 'setup.py']
|
cmd_output('git', 'add', '.')
|
||||||
|
cmd_output('git', 'commit', '-m', 'add some files')
|
||||||
|
files = git.get_changed_files('HEAD', 'HEAD^')
|
||||||
|
assert files == ['a.txt', 'b.txt']
|
||||||
|
|
||||||
# files changed in source but not in origin should not be returned
|
# files changed in source but not in origin should not be returned
|
||||||
files = git.get_changed_files('HEAD~10', 'HEAD')
|
files = git.get_changed_files('HEAD^', 'HEAD')
|
||||||
assert files == []
|
assert files == []
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue