Skip to content

Conversation

@DanieleSassoli
Copy link
Contributor

@DanieleSassoli DanieleSassoli commented Sep 1, 2025

This PR depends on @matts1 change that addst the Gerrit upload
command.

I should add, I'm very new to JJ and this is my first contribution.
Please let me know if I did anything wrong.

Checklist

If applicable:

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

@DanieleSassoli DanieleSassoli requested a review from a team as a code owner September 1, 2025 09:58
@DanieleSassoli DanieleSassoli changed the base branch from main to aseipp/push-uytvkxyqyspn September 1, 2025 09:58
@DanieleSassoli DanieleSassoli changed the title Add gerrit docs Add Working with Gerrit docs Sep 1, 2025
@DanieleSassoli DanieleSassoli changed the title Add Working with Gerrit docs docs: add working with gerrit section Sep 1, 2025
@PhilipMetzger
Copy link
Contributor

PhilipMetzger commented Sep 1, 2025

This in general looks good to me, but your patch is failing the CI because the commit title not the PR title should be docs: <your-title> so to fix it copy the current PR title to the commit description and re-push it again.

Copy link
Contributor

@matts1 matts1 left a comment

Choose a reason for hiding this comment

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

Generally looks pretty good, but 3 main focus areas:

  • User guides should focus on how a user interacts with something, rather than the technical details of how it works under the hood
  • You make a lot of assumptions about the user's workflow, in particular @- vs @. JJ does not distinguish these. You're welcome to use @- in your examples, but we should avoid making assumptions and saying things like "@- is the last non-empty commit"
  • One thing it appears you've missed in how the command works is that when you push to gerrit, you are pushing not just a single commit, but a stack of changes. So your usage of trunk()..@- are equivalent to @-

@matts1
Copy link
Contributor

matts1 commented Sep 2, 2025

I've updated the docstrings for the commands in the original pr, since the behaviour around stacked commits was very non-obvious.

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.

just minor stuff

@DanieleSassoli DanieleSassoli force-pushed the add_gerrit_docs branch 5 times, most recently from 260d695 to 42e9d3e Compare September 3, 2025 18:03
@DanieleSassoli
Copy link
Contributor Author

I must have messed up the change trying to rebase it on top of the latest branch, apologies, fixing it now.

@DanieleSassoli DanieleSassoli force-pushed the add_gerrit_docs branch 2 times, most recently from b256a97 to 6916452 Compare September 3, 2025 19:59
Copy link
Contributor

@matts1 matts1 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@matts1
Copy link
Contributor

matts1 commented Sep 4, 2025

Ah, I just noticed that you appear to have uploaded two commits here. IIRC when working with jj we require that in a PR, each commit be useful on its own, rather than just the response to previous feedback, so I think you should squash your two commits and reupload.

@DanieleSassoli
Copy link
Contributor Author

@matts1 apologies, missed it when pushing. Thanks for pointing it out.

@DanieleSassoli DanieleSassoli changed the base branch from aseipp/push-uytvkxyqyspn to main September 16, 2025 10:05
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

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

Thanks!

Currently there are instructions on how to setup jj to work with GitHub,
but not Gerrit, which seems to be very popular with the jj community.

Add a gerrit.md file to help users discover the jj gerrit subcommand.
@DanieleSassoli DanieleSassoli added this pull request to the merge queue Sep 16, 2025
Merged via the queue into jj-vcs:main with commit 92f325e Sep 16, 2025
29 checks passed
@DanieleSassoli DanieleSassoli deleted the add_gerrit_docs branch September 16, 2025 21:34
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.

6 participants