-
Notifications
You must be signed in to change notification settings - Fork 326
feat: sync multiselect of branches and tags with commit list #2020
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
base: develop
Are you sure you want to change the base?
Conversation
|
I do not like this feature. Since the For example, when selecting branch A, B, C (the HEAD of C and B points to the same revision/commit), the Here is the current approach of
|
And I am heavily missing this feature after Moving from Fork and it fulfills exactly my needs. It's very cumbersome to manually search for the commits in the history to do a quick compare. To that extend that if SourceGit doesn't add it, I'll start maintaining my own fork of SourceGit for that purpose. It is part of my daily workflow to do quick diffing between branches. It's a lot of time wasted searching things in the commit history manually.
Not sure what you mean. The compare page shows which revision is left and right. Just because there are exceptions and variants where the diffing does not activate, there is still the added value for the main use-case of diffing two different branches quickly.
The problems you describe are not caused by my extension but are a general SourceGit issue. You get the exact same experience when you search the branches manually in the commit history and select them. As described in the PR notes: SourceGit already selects the commit in the history when you select a branch. I simply extended it to support multi-select and this activates the existing feature. If multiple branches point to the same commit, this one and only commit is selected in the history and no diffing activates. It's equal to select the one and only row in the commit history. I did not add any custom logic to activate the revision compare in such cases. |
|
In my opinion, the correct approach should be:
This way, users can form a consistent and easier-to-understand behavior, that is: selecting two refs allows them to be compared. |
|
I've pushed two new commits:
|
|
I've totally rewrited the ref comparison ways. And now the For ref comparison, a |



See #2004
Old Behavior: If one branch is selected in the sidebar, the respective commit was selected in the commit list.
New Behavior: All selected branches or tags are synced to the commit list enabling branch diffing by selecting the branches in the sidebar.
Further details: To keep the change focused I didn't rework the sidebar further to also allow selecting tags and branches across the "groups" (e.g. selecting a tag and a branch). This could be a second extension.
I tried to follow the existing principles how the components and viewmodels already communicate between them. Architecturally the selection could be synced better via managing a central observable collection to which all components contribute their selections. But that's not how SourceGit currently works. I didn't want to rework too much but focus on the feature.
Not perfect, but definitely a improvement.
Demo:
SourceGit_u39iBWabEW.mp4