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

Improve error messages #30

Open
3 tasks
JetpackDuba opened this issue Nov 2, 2022 · 2 comments
Open
3 tasks

Improve error messages #30

JetpackDuba opened this issue Nov 2, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@JetpackDuba
Copy link
Owner

JetpackDuba commented Nov 2, 2022

Whenever is possible, errors should give more details to the user about what has caused the issue, how can it be solved and if there are any alternatives.

Example:
image

List of issues that should show a custom error dialog:

  • Trying to checkout a remote branch when there is an exiting local branch with the same name.
  • Option to turn off SSL verification for specific repository (or provide the option to import a certificate, related to Support for custom certificates #48).
  • Having a missconfigured (or unsupported) credentials manager should provide a more descriptive message.
  • WIP...
@JetpackDuba
Copy link
Owner Author

JetpackDuba commented May 26, 2023

From @adam-ce at #119 . Better error message when trying to checkout a remote branch with an existing local branch.

Describe the bug you can't check out a branch via the remote handle visible in the tree, if it was checked out before, but is not up-to-date. An error pops up, saying "Ref branch_name already exists".

To Reproduce

1. create a repo with a main branch 'main' on machine A

2. create a branch 'B' on machine A

3. push to a remote (e.g. github) from machine A

4. clone the remote on a different machine B

5. checkout  'B' on machine B

6. checkout 'main' on the machine B

7. commit something to 'B' on machine A

8. push to the remote on machine A

9. pull / fetch the branch main on machine B (the commit to branch 'B' will become visible in the tree view).

10. try checking out 'origin/B' on machine B (it'll fail)

11. checking out 'B' (the local branch) on machine B works (but the local branch might be so many commits behind, that it is outside of the view)

Expected behavior

a text 'checkout origin/B' might be confusing as a menu entry (since the branch is already locally available, and might contain other commits). so therefore i would expect an entry saying 'checkout local branch and pull', or only 'checkout local branch'.

Desktop (please complete the following information):

* OS: linux (kubuntu 22.04)

* Version 1.2.1 via flathub

Additional comment from @JetpackDuba :

Something else to add is that in some specific cases, the local branch may not be referencing the remote branch with the same name, as you can have multiple remotes. There is also the case where a local branch named X references a remote branch named Y, making things even harder.

Probably the first case should is the most relevant but both cases should be investigated.

@adam-ce
Copy link

adam-ce commented Jun 4, 2023

local branches posses the information about what they are tracking. so one should not 'name match', but instead use that tracking information. best to also show it in the gui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants