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

Commitb303cb0

Browse files
thetwojByron
authored andcommitted
Initial stab at fixing diffs involving submodule changes
1 parent6fd0902 commitb303cb0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎git/cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
defhandle_process_output(process,stdout_handler,stderr_handler,
6969
finalizer=None,decode_streams=True):
70-
"""Registers for notifications tolean that process output is ready to read, and dispatches lines to
70+
"""Registers for notifications tolearn that process output is ready to read, and dispatches lines to
7171
the respective line handlers.
7272
This function returns once the finalizer returns
7373

‎git/diff.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,14 @@ def __init__(self, repo, a_rawpath, b_rawpath, a_blob_id, b_blob_id, a_mode,
278278
ifself.b_mode:
279279
self.b_mode=mode_str_to_int(self.b_mode)
280280

281+
# Determine whether this diff references a submodule, if it does then
282+
# we need to overwrite "repo" to the corresponding submodule's repo instead
283+
ifrepoanda_rawpath:
284+
forsubmoduleinrepo.submodules:
285+
ifsubmodule.path==a_rawpath.decode("utf-8"):
286+
repo=submodule.module()
287+
break
288+
281289
ifa_blob_idisNoneora_blob_id==self.NULL_HEX_SHA:
282290
self.a_blob=None
283291
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp