Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Fix IndexFile.from_tree on Windows#1751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes fromall commits
e359718
b12fd4a
12bbace
928ca1e
9e5d0aa
782c062
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -52,5 +52,6 @@ Contributors are: | ||
-Joseph Hale <me _at_ jhale.dev> | ||
-Santos Gallegos <stsewd _at_ proton.me> | ||
-Wenhan Zhu <wzhu.cosmos _at_ gmail.com> | ||
-Eliah Kagan <eliah.kagan _at_ gmail.com> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. About time :D! | ||
Portions derived from other open source works and are clearly marked. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -17,17 +17,21 @@ | ||
from sumtypes import constructor, sumtype | ||
from git import ( | ||
BlobFilter, | ||
Diff, | ||
Git, | ||
IndexFile, | ||
Object, | ||
Repo, | ||
Tree, | ||
) | ||
from git.exc import ( | ||
CheckoutError, | ||
GitCommandError, | ||
HookExecutionError, | ||
InvalidGitRepositoryError, | ||
UnmergedEntriesError, | ||
) | ||
from git.index.fun import hook_path | ||
from git.index.typ import BaseIndexEntry, IndexEntry | ||
from git.objects import Blob | ||
@@ -284,14 +288,6 @@ def add_bad_blob(): | ||
except Exception as ex: | ||
assert "index.lock' could not be obtained" not in str(ex) | ||
@with_rw_repo("0.1.6") | ||
def test_index_file_from_tree(self, rw_repo): | ||
common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541" | ||
@@ -342,14 +338,6 @@ def test_index_file_from_tree(self, rw_repo): | ||
# END for each blob | ||
self.assertEqual(num_blobs, len(three_way_index.entries)) | ||
@with_rw_repo("0.1.6") | ||
def test_index_merge_tree(self, rw_repo): | ||
# A bit out of place, but we need a different repo for this: | ||
@@ -412,14 +400,6 @@ def test_index_merge_tree(self, rw_repo): | ||
self.assertEqual(len(unmerged_blobs), 1) | ||
self.assertEqual(list(unmerged_blobs.keys())[0], manifest_key[0]) | ||
@with_rw_repo("0.1.6") | ||
def test_index_file_diffing(self, rw_repo): | ||
# Default Index instance points to our index. | ||
@@ -555,12 +535,9 @@ def _count_existing(self, repo, files): | ||
# END num existing helper | ||
@pytest.mark.xfail( | ||
os.name == "nt" and Git().config("core.symlinks") == "true", | ||
MemberAuthor
| ||
reason="Assumes symlinks are not created on Windows and opens a symlink to a nonexistent target.", | ||
raises=FileNotFoundError, | ||
) | ||
@with_rw_repo("0.1.6") | ||
def test_index_mutation(self, rw_repo): | ||
@@ -772,7 +749,7 @@ def mixed_iterator(): | ||
# END for each target | ||
# END real symlink test | ||
# Add fake symlink and assure it checks out as a symlink. | ||
fake_symlink_relapath = "my_fake_symlink" | ||
link_target = "/etc/that" | ||
fake_symlink_path = self._make_file(fake_symlink_relapath, link_target, rw_repo) | ||
@@ -806,7 +783,7 @@ def mixed_iterator(): | ||
os.remove(fake_symlink_path) | ||
index.checkout(fake_symlink_path) | ||
# On Windows, wecurrently assume wewill never get symlinks. | ||
if os.name == "nt": | ||
# Symlinks should contain the link as text (which is what a | ||
# symlink actually is). | ||
@@ -915,14 +892,6 @@ def make_paths(): | ||
for absfile in absfiles: | ||
assert osp.isfile(absfile) | ||
@with_rw_repo("HEAD") | ||
def test_compare_write_tree(self, rw_repo): | ||
"""Test writing all trees, comparing them for equality.""" | ||