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

FR: Warn only when not pushing private commits #5936

Open
senekor opened this issue Mar 8, 2025 · 2 comments · May be fixed by #5950
Open

FR: Warn only when not pushing private commits #5936

senekor opened this issue Mar 8, 2025 · 2 comments · May be fixed by #5950
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@senekor
Copy link
Contributor

senekor commented Mar 8, 2025

Is your feature request related to a problem? Please describe.

I am using the megamerge worklow with some local-only and some public changes on parallel branches. I have a bookmark pointing to the local-only change so I can refer to it easily. I would like to jj git push my other bookmark(s) with the public changes, but jj hard-errors on the one bookmark with local changes.

Describe the solution you'd like

Only emit a warning with the list of bookmarks that weren't pushed, because they contain private commits. Still push the other bookmarks.

Describe alternatives you've considered

Maybe it's possible to configure a default push revset that excludes any bookmarks that contain private commits? I wouldn't know how to do that though.

I might also be holding it wrong™, please tell me if you have a different workflow for working with local-only and public changes in parallel, without running into this problem.

Additional context

repro steps:

# init temp repo with some remote
jj new -m a -r 'root()' ; jj bookmark create a --to @
jj new -m b -r 'root()' ; jj bookmark create b --to @
jj config set --repo "git.private-commits" '"description(\'b\')"'
jj new a b
jj git push
@PhilipMetzger
Copy link
Contributor

I think this could be done via a flag, which won't require major changes.

@senekor
Copy link
Contributor Author

senekor commented Mar 8, 2025

That sounds good. Ideally the first hard error also informs the users about that flag. I might try to add this if I find the time.

@PhilipMetzger PhilipMetzger added the polish🪒🐃 Make existing features more convenient and more consistent label Mar 9, 2025
@senekor senekor linked a pull request Mar 9, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polish🪒🐃 Make existing features more convenient and more consistent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants