Skip to content

show remote branches In log #1501

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

Closed
extrawurst opened this issue Jan 8, 2023 · 8 comments · Fixed by #1640
Closed

show remote branches In log #1501

extrawurst opened this issue Jan 8, 2023 · 8 comments · Fixed by #1640
Milestone

Comments

@extrawurst
Copy link
Collaborator

extrawurst commented Jan 8, 2023

only if remote and local are on a different commit

@extrawurst extrawurst added this to the v0.23 milestone Jan 8, 2023
@cruessler
Copy link
Collaborator

@extrawurst I’d like to work on this issue, hoping to get a PR ready by the weekend!

@extrawurst
Copy link
Collaborator Author

@cruessler absolutely! note that the showing of local branches was already added in #1371 and that we now only need to extend this to remote branches

@cruessler
Copy link
Collaborator

@extrawurst This was more complicated than I expected. Currently, branch names are stored as Strings in CommitList and don’t contain information about corresponding upstream branches. We could change that and use BranchInfo, but we would need to change LocalBranch which currently has has_upstream: bool, but no information on which upstream it is tracking.

I see two options:

  1. Implement a simple solution that does show remote branches even for commits where there’s a corresponding local branch. This would be easy and still could later be extended.
  2. Change the way information about branches is stored, in particular, add something like upstream: String to LocalBranch and use that information in CommitList. This would require more work, but it would satisfy the requirement to only show remote branches when they are on a different commit than their corresponding local branch.

@extrawurst
Copy link
Collaborator Author

Hey @cruessler thanks for looking into this. To be honest I see a lot of value in doing "right" now (option 2) because having that info of what upstreams a local branch has will also be relevant for #1306 (pushing to all remotes of a branch) - wdyt?

@cruessler
Copy link
Collaborator

I also think it makes sense to go for the more precise option. Locally, I already started looking into extending LocalBranch, but I wasn’t sure whether it would be better to separate the UI feature from changing the data structures because I don’t yet know which parts of the application will be affected by the latter. I’ll try doing both changes in this PR, and then we can decide how to proceed.

@janbaer
Copy link

janbaer commented Mar 14, 2023

I used TIG before, and I was also missing the helpful information about how much ahead my current branch is of current or remote head. @extrawurst take a look on, how it's looking in TIG. Thanks in advance!

@extrawurst
Copy link
Collaborator Author

@janbaer that would be #81

@extrawurst
Copy link
Collaborator Author

this issue is just about showing the labels like we already do with local branches tips

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

Successfully merging a pull request may close this issue.

3 participants