Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06eca0b

Browse files
committed
Make subodule a forward ref in Index.base
1 parent94c2ae4 commit06eca0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/index/base.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
)
2323
fromgit.objectsimport (
2424
Blob,
25-
Submodule,
2625
Tree,
2726
Object,
2827
Commit,
@@ -76,6 +75,7 @@
7675
fromgit.repoimportRepo
7776
fromgit.refs.referenceimportReference
7877
fromgit.utilimportActor
78+
fromgit.objects.submodule.baseimportSubmodule
7979

8080

8181
StageType=int
@@ -842,7 +842,7 @@ def _items_to_rela_paths(self, items):
842842
items= [items]
843843

844844
foriteminitems:
845-
ifisinstance(item, (BaseIndexEntry, (Blob,Submodule))):
845+
ifisinstance(item, (BaseIndexEntry, (Blob,'Submodule'))):
846846
paths.append(self._to_relative_path(item.path))
847847
elifisinstance(item,str):
848848
paths.append(self._to_relative_path(item))
@@ -853,7 +853,7 @@ def _items_to_rela_paths(self, items):
853853

854854
@post_clear_cache
855855
@default_index
856-
defremove(self,items:Sequence[Union[PathLike,Blob,BaseIndexEntry,Submodule]],working_tree:bool=False,
856+
defremove(self,items:Sequence[Union[PathLike,Blob,BaseIndexEntry,'Submodule']],working_tree:bool=False,
857857
**kwargs:Any)->List[str]:
858858
"""Remove the given items from the index and optionally from
859859
the working tree as well.
@@ -905,7 +905,7 @@ def remove(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, Submodule
905905

906906
@post_clear_cache
907907
@default_index
908-
defmove(self,items:Sequence[Union[PathLike,Blob,BaseIndexEntry,Submodule]],skip_errors:bool=False,
908+
defmove(self,items:Sequence[Union[PathLike,Blob,BaseIndexEntry,'Submodule']],skip_errors:bool=False,
909909
**kwargs:Any)->List[Tuple[str,str]]:
910910
"""Rename/move the items, whereas the last item is considered the destination of
911911
the move operation. If the destination is a file, the first item ( of two )

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp