forked from jelmer/dulwich
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch older-git: skip worktree list test against older versions o…
…f git.
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
commit cad0484f5293c8e95673ab2744680dcc977099b0 | ||
Author: Jelmer Vernooij <jelmer@jelmer.uk> | ||
Date: Mon Dec 26 11:20:17 2016 +0000 | ||
|
||
Only run 'git worktree list' when it is available. | ||
|
||
diff --git a/dulwich/tests/compat/test_repository.py b/dulwich/tests/compat/test_repository.py | ||
index ee19ae6..c39ff84 100644 | ||
--- a/dulwich/tests/compat/test_repository.py | ||
+++ b/dulwich/tests/compat/test_repository.py | ||
@@ -34,6 +34,7 @@ from dulwich.repo import ( | ||
Repo, | ||
) | ||
from dulwich.tests.compat.utils import ( | ||
+ require_git_version, | ||
rmtree_ro, | ||
run_git_or_fail, | ||
CompatTestCase, | ||
@@ -172,6 +172,8 @@ class WorkingTreeTestCase(ObjectStoreTestCase): | ||
return worktrees | ||
|
||
def test_git_worktree_list(self): | ||
+ # 'git worktree list' was introduced in 2.7.0 | ||
+ require_git_version((2, 7, 0)) | ||
output = run_git_or_fail(['worktree', 'list'], cwd=self._repo.path) | ||
worktrees = self._parse_worktree_list(output) | ||
self.assertEqual(len(worktrees), self._number_of_working_tree) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
older-git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters