mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Support pre-commit from inside submodules
This commit is contained in:
parent
d6cf62532d
commit
c3c98afe4f
7 changed files with 92 additions and 26 deletions
|
|
@ -43,6 +43,10 @@ def test_is_in_merge_conflict(in_merge_conflict):
|
|||
assert git.is_in_merge_conflict() is True
|
||||
|
||||
|
||||
def test_is_in_merge_conflict_submodule(in_conflicting_submodule):
|
||||
assert git.is_in_merge_conflict() is True
|
||||
|
||||
|
||||
def test_cherry_pick_conflict(in_merge_conflict):
|
||||
cmd_output('git', 'merge', '--abort')
|
||||
foo_ref = cmd_output('git', 'rev-parse', 'foo')[1].strip()
|
||||
|
|
@ -111,6 +115,11 @@ def test_get_conflicted_files(in_merge_conflict):
|
|||
assert ret == set(('conflict_file', 'other_file'))
|
||||
|
||||
|
||||
def test_get_conflicted_files_in_submodule(in_conflicting_submodule):
|
||||
resolve_conflict()
|
||||
assert set(git.get_conflicted_files()) == set(('conflict_file',))
|
||||
|
||||
|
||||
def test_get_conflicted_files_unstaged_files(in_merge_conflict):
|
||||
# If they for whatever reason did pre-commit run --no-stash during a
|
||||
# conflict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue