Skip to content
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

[Feature] Support resolving lockfile merge conflicts from git revert #6260

Open
1 of 2 tasks
merceyz opened this issue Apr 30, 2024 · 0 comments
Open
1 of 2 tasks

[Feature] Support resolving lockfile merge conflicts from git revert #6260

merceyz opened this issue Apr 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@merceyz
Copy link
Member

merceyz commented Apr 30, 2024

  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

Yarn currently supports resolving merge conflicts in the lockfile caused by git merge, git rebase, and git cherry-pick but not git revert.

Describe the solution you'd like

Support resolving merge conflicts from git revert by checking git rev-parse REVERT_HEAD HEAD here:

let commits = await execUtils.execvp(`git`, [`rev-parse`, `MERGE_HEAD`, `HEAD`], {
cwd: configuration.projectCwd,
});
if (commits.code !== 0) {
commits = await execUtils.execvp(`git`, [`rev-parse`, `REBASE_HEAD`, `HEAD`], {
cwd: configuration.projectCwd,
});
}
if (commits.code !== 0) {
commits = await execUtils.execvp(`git`, [`rev-parse`, `CHERRY_PICK_HEAD`, `HEAD`], {
cwd: configuration.projectCwd,
});
}

@merceyz merceyz added the enhancement New feature or request label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant