Skip to content

sl push: more helpful message#1278

Open
stepancheg wants to merge 1 commit intofacebook:mainfrom
stepancheg:fix-message
Open

sl push: more helpful message#1278
stepancheg wants to merge 1 commit intofacebook:mainfrom
stepancheg:fix-message

Conversation

@stepancheg
Copy link
Copy Markdown
Contributor

@stepancheg stepancheg commented Apr 9, 2026

sl push   # no args
abort: nothing to push - current commit is already at origin/master

instead of

abort: use '--to' to specify destination bookmark

@meta-cla meta-cla Bot added the CLA Signed label Apr 9, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 9, 2026

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D100203517. (Because this pull request was imported automatically, there will not be any future comments.)

Copy link
Copy Markdown
Contributor

@quark-zju quark-zju left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@quark-zju
Copy link
Copy Markdown
Contributor

(seems comment isn't synced so I pasted it here)

The code seems fragile - it currently depends on the subtle behavior that _guesspushtobookmark returns None for "nothing to push" case, but _guesspushtobookmark could also return None for other reasons. It also prints all remotenames of the current commit, instead of the intended implicit "to".

How do you think about?

  1. Change _guesspushtobookmark report the "origin/foo" even if it is the current commit.
  2. (Optionally) Names to print (at_bookmarks) use the explicit or implicit "to", not listing what names the current commit has.
  3. (Optionally) If nothing pushed (note the local remotenames can be outdated, so attempt to push is still needed), exit 1 instead of 255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants