Skip to content

Commit

Permalink
fix: use --relative in git diff
Browse files Browse the repository at this point in the history
  • Loading branch information
sabard committed Jan 3, 2022
1 parent 83adced commit 272b575
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion copier/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def clone(url: str, ref: OptStr = None) -> str:
"diff",
"--binary",
"--no-index",
"relative",
"--relative",
location,
".",
retcode=None,
Expand All @@ -155,6 +155,9 @@ def clone(url: str, ref: OptStr = None) -> str:

if is_dirty:
with local.cwd(location):
lines = diff.split("\n")
for i in range(105):
print(lines[i])
apply_cmd = git["apply", "--unsafe-paths", "--exclude=*/.git/*"]
(apply_cmd << diff)()
git("add", "-A")
Expand Down

0 comments on commit 272b575

Please sign in to comment.