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

git commit & push is confusing #19

Open
dezren39 opened this issue Oct 16, 2022 · 2 comments
Open

git commit & push is confusing #19

dezren39 opened this issue Oct 16, 2022 · 2 comments

Comments

@dezren39
Copy link

i like the idea, but i wish there was some way to say 'i dont care if there is no commit, either dont commit something or commit an empty message and then push' maybe a 'sync' button

@reox
Copy link

reox commented May 8, 2023

It was confusing for me as well, that if there is nothing to commit but to push, that this action fails.
image
Here, the only way is to deliberately add a new change and press commit&push again

It also shows as failed if nothing is to commit and nothing to push:
image
This message is annoying, because it is not an error.

My expected behavior would be:

  • If there is nothing to commit, say that as a success message and proceed to push
  • If there is nothing to push, say that as a success message and exit

maybe it helps to run git diff --cached --exit-code before calling git commit. If it returns a non-zero status, there is something staged but not yet commit.
If git commit is called without anything staged it will return exit code 1 - which is however misleading in this case.

@k2s
Copy link
Contributor

k2s commented Aug 9, 2023

this is fixed in #39

the new Sync action mapped to Ctrl+S handles this correctly

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

No branches or pull requests

3 participants