-
Notifications
You must be signed in to change notification settings - Fork 346
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 commits abandoned by git::import_refs() or fetch() #2311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This seems useful.
By the way, one advantage of having jj git sync
command is that it can avoid showing some of the conflicted commits to the user.
5dda81f
to
54143c8
Compare
It'll be reported to user.
This wasn't a problem before, but we wouldn't want to report previously-hidden commits as abandoned.
I'll make it a bit more verbose if mut_repo().has_changes().
This will probably help to understand why you've got conflicts after fetching. Maybe we can also report changed local refs. I think the stats should be redirected to stderr, but we have many other similar messages printed to stdout. I'll probably fix them all at once later.
…git import Otherwise, it's unclear why "jj status" abandoned commits for example.
54143c8
to
e301b4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still a bit uneasy about this (whether it will create confusion, especially for beginners that didn't notice the abandoned commits and don't quite understand what it means), but this is clearly useful for people who notice the abandoned commits themselves. I think there's a good chance it's fine. We should try this version and see how (and whether) people react.
Yuya mentioned something intersting about this triggering unexpected test changes. I'll leave it up to him whether to look into it before or after merging this.
Checklist
If applicable:
CHANGELOG.md