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

Commitd7bf231

Browse files
committed
Merge branch 'GitPython-1616'
2 parentsf0e7e41 +1808ddd commitd7bf231

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎git/cmd.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,12 @@ def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]:
13221322
tokens=header_line.split()
13231323
iflen(tokens)!=3:
13241324
ifnottokens:
1325-
raiseValueError("SHA could not be resolved, git returned: %r"% (header_line.strip()))
1325+
err_msg= (
1326+
f"SHA is empty, possible dubious ownership in the repository "
1327+
f"""at{self._working_dir}.\n If this is unintended run:\n\n """
1328+
f""" "git config --global --add safe.directory{self._working_dir}" """
1329+
)
1330+
raiseValueError(err_msg)
13261331
else:
13271332
raiseValueError("SHA %s could not be resolved, git returned: %r"% (tokens[0],header_line.strip()))
13281333
# END handle actual return value

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp