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

Commita3789b2

Browse files
author
Mario Alvarado
committed
Adding dubious ownership handling
1 parent07f3641 commita3789b2

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
@@ -1333,7 +1333,12 @@ def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]:
13331333
tokens=header_line.split()
13341334
iflen(tokens)!=3:
13351335
ifnottokens:
1336-
raiseValueError("SHA could not be resolved, git returned: %r"% (header_line.strip()))
1336+
err_msg= (
1337+
f"SHA is empty, possible dubious ownership in the repository "
1338+
f"""at{self._working_dir}.\n If this is unintended run:\n\n """
1339+
f""" "git config --global --add safe.directory{self._working_dir}" """
1340+
)
1341+
raiseValueError(err_msg)
13371342
else:
13381343
raiseValueError("SHA %s could not be resolved, git returned: %r"% (tokens[0],header_line.strip()))
13391344
# END handle actual return value

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp