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

Commit037d62a

Browse files
GielVanSchijndel-TomTomByron
authored andcommitted
fix(fetch): use the correct FETCH_HEAD from within a worktree
FETCH_HEAD is one of the symbolic references local to the currentworktree and as such should _not_ be looked up in the 'common_dir'. Butinstead of just hard coding the "right thing" (git_dir) lets defer thisto the SymbolicReference class which already contains this knowledge inits 'abspath' property.
1 parentdd3cdfc commit037d62a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎git/remote.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
join_path,
2323
)
2424

25-
importos.pathasosp
26-
2725
from .configimport (
2826
SectionConstraint,
2927
cp,
@@ -685,7 +683,8 @@ def _get_fetch_info_from_stderr(self, proc, progress):
685683
continue
686684

687685
# read head information
688-
withopen(osp.join(self.repo.common_dir,'FETCH_HEAD'),'rb')asfp:
686+
fetch_head=SymbolicReference(self.repo,"FETCH_HEAD")
687+
withopen(fetch_head.abspath,'rb')asfp:
689688
fetch_head_info= [line.decode(defenc)forlineinfp.readlines()]
690689

691690
l_fil=len(fetch_info_lines)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp