Skip to content

Commit 99b7c93

Browse files
committed
chore(git_shell): bypass git dubious ownership errors
1 parent 49887e9 commit 99b7c93

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
A new scriv changelog fragment.
3+
4+
Uncomment the section that is right (remove the HTML comment wrapper).
5+
For top level release notes, leave all the headers commented out.
6+
-->
7+
8+
<!--
9+
### Removed
10+
11+
- A bullet item for the Removed category.
12+
13+
-->
14+
<!--
15+
### Added
16+
17+
- A bullet item for the Added category.
18+
19+
-->
20+
21+
### Changed
22+
23+
- Bypass git dubious ownership errors by default.
24+
25+
<!--
26+
### Deprecated
27+
28+
- A bullet item for the Deprecated category.
29+
30+
-->
31+
<!--
32+
### Fixed
33+
34+
- A bullet item for the Fixed category.
35+
36+
-->
37+
<!--
38+
### Security
39+
40+
- A bullet item for the Security category.
41+
42+
-->

ggshield/utils/git_shell.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ def git(
214214
logger.debug("command=%s timeout=%d", command, timeout)
215215
result = subprocess.run(
216216
(
217-
[_get_git_path(), "-c", "core.quotePath=false"]
217+
[
218+
_get_git_path(),
219+
"-c",
220+
"core.quotePath=false",
221+
"-c",
222+
"safe.directory=*",
223+
]
218224
+ (
219225
["-c", "core.longpaths=true"]
220226
if platform.system() == "Windows"

0 commit comments

Comments
 (0)