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

Add support to gps list to handle being run when not in a branch with an upstream tracking branch #276

Open
drewdeponte opened this issue Nov 20, 2023 · 2 comments

Comments

@drewdeponte
Copy link
Member

Currently when you run gps list in a branch that has no upstream tracking branch it errors with the following.

✔ gps ls

Error: get upstream branch name failed

Instead of doing this it would be nice if it did something more useful. I am not sure just yet exactly what that is.

I was thinking it might make sense to simply display all the commits in the branch along with a warning saying there is no upstream tracking branch and letting the user know it isn't officially a patch stack yet.

This would for example be useful in the scenario where you start a new git repository and you just have a main branch locally with no upstream tracking branch because you haven't created an upstream repository yet and set it up in your repo.

One downside to this idea would be that if you are in an existing project that has a bunch of commits on a mainline and you are on another branch without an upstream tracking branch, but it is based on the mainline then it would be displaying all the commits back to the beginning of time. Which seems not super useful.

Anyways, just wanted to start this discussion around this to see if there is something more useful we could/should be doing.

@Alizter
Copy link
Collaborator

Alizter commented Nov 20, 2023

We could also suggest the git command that needs to be run in order to add an upstream since that is not always easy to remember.

@drewdeponte
Copy link
Member Author

Yeah, that might be the most useful thing to do actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Discussion
Development

No branches or pull requests

2 participants