Skip to content

fix: correct git stage order on merge conflicts #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions copier/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def _apply_update(self) -> None: # noqa: C901
perms_sha_mode, path = line.split("\t")
perms, sha, _ = perms_sha_mode.split()
input_lines.append(f"0 {'0' * 40}\t{path}")
input_lines.append(f"{perms} {sha} 1\t{path}")
input_lines.append(f"{perms} {sha} 2\t{path}")
with suppress(ProcessExecutionError):
# The following command will fail
# if the file did not exist in the previous version.
Expand All @@ -1344,7 +1344,7 @@ def _apply_update(self) -> None: # noqa: C901
"-w",
old_path / normalize_git_path(path),
).strip()
input_lines.append(f"{perms} {old_sha} 2\t{path}")
input_lines.append(f"{perms} {old_sha} 1\t{path}")
with suppress(ProcessExecutionError):
# The following command will fail
# if the file was deleted in the latest version.
Expand Down
Loading