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

cli: print a message about new and resolved conflicts #2606

Merged
merged 2 commits into from
Dec 10, 2023

Conversation

martinvonz
Copy link
Member

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

Copy link
Contributor

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it's only a missing a Fixes #555 in the commit message.

@martinvonz martinvonz force-pushed the push-ryqxvrzulvxt branch 3 times, most recently from e2c2001 to 587498d Compare December 1, 2023 19:54
@martinvonz martinvonz marked this pull request as ready for review December 1, 2023 19:54
@martinvonz
Copy link
Member Author

LGTM, it's only a missing a Fixes #555 in the commit message.

That bug also mentioned divergent changes and conflicted branches. Perhaps it should have been 3 separate bugs. Maybe I'll close it and open new ones for the remaining bits once this is in.

cli/src/cli_util.rs Outdated Show resolved Hide resolved
@PhilipMetzger
Copy link
Contributor

That bug also mentioned divergent changes and conflicted branches. Perhaps it should have been 3 separate bugs. Maybe I'll close it and open new ones for the remaining bits once this is in.

SGTM, as long as we close them when this lands.

@martinvonz martinvonz force-pushed the push-ryqxvrzulvxt branch 3 times, most recently from 6c6dd21 to f69be88 Compare December 1, 2023 23:21
@martinvonz
Copy link
Member Author

I'll leave this until after the release on Wednesday since it's pretty large UX change and might have unknown rough edges.

@martinvonz
Copy link
Member Author

I'll probably merge this in a day or two if there are no further reviews

When e.g. `jj rebase` results in new conflicts, it's useful for the
user to learn about that without having to run `jj log` right
after. This patch adds reporting of new conflicts created by an
operation. It also add reporting of conflicts that were resolved or
abandoned by the operation.

There was no measurable performance impact when rebasing a single
commit in the Linux kernel repo.
This prints a hint about using `jj new <first conflicted commit>` and
`jj squash` to resolve conflicts. The hint is printed whenever there
are new or resolved conflicts.

I hope this hint will be useful especially for new users so they know
which commit to resolve conflicts in first. It may not be obvious that
they should start with the bottommost one. I hope the hint will also
be useful for more more experienced user by letting them just copy the
printed command without first running `jj log` to find the right
commit..
@martinvonz martinvonz merged commit a88b3dd into main Dec 10, 2023
15 checks passed
@martinvonz martinvonz deleted the push-ryqxvrzulvxt branch December 10, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants