2019.2 GIT branch Compare With Current changed

Answered

Previous to 2019.2, the GIT branch Compare With Current feature would display a popup with current branch in a top pane and the selected branch in the bottom.  In each pane would be a list of commits that did not exist in the other.  I found this to be extremely helpful when determining merges.  In 2019.2, this feature now just lists the updated files from the selected branch.  Is there any way I can get the old way of comparing branches?

Thanks a bunch.

71 comments
Comment actions Permalink

Also agree that the 'old' way fit the use case of get overview of branch commit difference in _both_ directions.   

If you can add 'show both' to 'Show diff with working tree' I think that would go a long way toward satisfying most of the folks who have voiced objections here.

PLEASE update the documentation to show this!  The docs still describe the old way.

0
Comment actions Permalink

I actually like the new Tool Window tab, I just wish it was designed more like the Local Changes view. And the default view should show the changed files compared with the branch - similar to the Github "Changed Files" tab. This is mostly what developers care about - less so for diffs from individual commits.

0
Comment actions Permalink

opticyclic searches You can drag the editor tab with branches comparison outside the window and you will get a dedicated window which you can make full screen.

0
Comment actions Permalink

While we're on the topic, would it be possible to make the filename that is currently being compared in the difference viewer BIGGER?

It's in the window title bar, and hard to discern as it is surrounded by the full path. (this file is clip_helper.rb) with large hre-res monitors it is way too small to read from sitting distance.  It is also dimmed which just makes it harder.  I could see dimming the full path and making the file name stand out brightly.

Below is a picture roughly from my sitting distance. My spaghetti code is readable, but figuring out what file it is difficult.

 

0
Comment actions Permalink

Hello Josh Cohen

Please vote for a ticket and feel free to comment:
https://youtrack.jetbrains.com/issue/UX-1510

0
Comment actions Permalink

I get:

"Nope, can't find it!
It could mean that the URL points to a page that doesn't exist or the URL is correct and you don't have permission to view this content."
0
Comment actions Permalink

Josh Cohen

I am sorry for the inconvenience, the UX part of YouTrack is internal.

There is another ticket which you may find useful and it would meet your needs, please see and vote:
https://youtrack.jetbrains.com/issue/IDEA-185808

0
Comment actions Permalink

This issue just gets worse and worse.

Comparing the file tree is now a separate action and is displayed in a completely different place.

0
Comment actions Permalink

> it tells nothing about all these critical (IMO) vcs related features.

That is true, the changes are very important. I am not sure why the video does not mention it, we'll check and update it, thank you for pointing to this.

The change, however, is described in the Release notes, What's new page and release blog post.

 

-1
Comment actions Permalink

What exactly is unreadable and why? Why is it unusable?

Yes, the UI has changed but the comparison still shows you the same list of commits, as the dialog used to. And it is even more readable now and has more details. The only difference is that by default a one-way comparison is shown, and we plan to address it soon, as noticed above, by adding the action that swaps comparison.

> 2 branches because it makes me to perform one comparison, then switch branches and compare again.

There is no need to checkout the branch to get the reverse comparison, as in fact, it is just a Branch filter. Since 2019.2 IntelliJ supports double-dot log filter as the Branch filter in the Log (git log branch1..branch2), and calling the action opens a log tab filtered by HEAD..targetbranch. So to get a reverse comparison, one could manually edit the filter to be tagretbranch..HEAD, or even HEAD..targetbranch|tagretbranch..HEAD to show the comparison in both ways. It will not be divided into 2 panes though but will have a graph to dedicate commits.

> The old popup dialog also contained a tab showing the actual changed files between one branch and another

Showing the tab was moved to the separate action - Show Diff with Working Tree, next to the Compare with Current in the Branches popup.

Also, it is now possible to call Compare with Current from the context menu to get the comparison of your working tree with ANY commit from the list.

> I'm wondering why in the world JetBrains felt this needed to be "fixed".

The reasons for the change are:

  1. The old dialog lacks features - it is no possible to cherry-pick, revert or merge branches from it, and this is possible with the new view. The new Log-based view allows this.
  2. The old dialog is slow (it takes a long time to load and executes expensive git log calls, especially on bit projects if branches diverge a lot). The new view is based on Git Log functionality and uses log index - so it is fast and cheap.
  3. It opens in a separate frame. This is not very useful if you use the Compare feature to review a branch or cherry-pick something.
  4. Its Files tab actually shows the difference with the working tree and not the branch tip, while the action name states otherwise
  5. It's an old code that requires effort to support and add new features to it, while there is a better engine at the moment.

See also https://youtrack.jetbrains.com/issue/IDEA-207634

Yes, there are issues with the UX here, and the major part is the reverse comparison - https://youtrack.jetbrains.com/issue/IDEA-209664 The UI change is also unexpected and could produce some confusing results (e.g. empty comparison), and we are working on improving this as well.

It would help a lot if exact issues are reported though for the new UI.

Thank you.

-34
Comment actions Permalink

No. there is no way to get the previous view.

An option for reverse comparison will be added soon. See https://youtrack.jetbrains.com/issue/IDEA-209664

-59

Please sign in to leave a comment.