Skip to content

Conversation

@Danielku15
Copy link

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

@love-linger
Copy link
Collaborator

I do not like this feature.

Since the RevisionCompare page does not show which revision is left or right side, and these selected branches/tags may point to the save revision, it is not really useful as expected.

For example, when selecting branch A, B, C (the HEAD of C and B points to the same revision/commit), the Revision Compare page shows two infos. But it not easy to find out which is A.

Here is the current approach of SourceGit:

  • When comparing two revisions (selected commits in HISTORY page), it is easy to checkout which revision is left or right side.
  • When choosing Compare with HEAD, there's a HEAD badge to show which side is HEAD commit.
  • When choosing Compare with Worktree, there's a Worktree badage to show which side is Worktree.
  • When choosing a branch to compare with current branch, the Branch Compare windows shows the position of these two branch.

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

Successfully merging this pull request may close these issues.

2 participants