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

Compare file differences between branches #1161

Closed
kayrunm opened this issue Nov 16, 2020 · 14 comments
Closed

Compare file differences between branches #1161

kayrunm opened this issue Nov 16, 2020 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@kayrunm
Copy link

kayrunm commented Nov 16, 2020

Since the new version (v11) I can't seem to just compare differences between files on different branches, rather than the behind/ahead in the new sidebar. Is there any way to get this comparison back?

An example of the functionality I'm missing is seen in this screenshot; the "1 file changed" bit.

image

@wwarby
Copy link

wwarby commented Nov 16, 2020

I have the same issue. I have a project in which I have two branches that diverged from one another some time ago and will never come back together, but in which I need to be able to see the differences. Before the update I was able to see a list of 20 or so files that were different between branches - now when I compare the branches I see dozens of commits in "Ahead" and Behind" but no file differences. I was utterly reliant on this functionality to manage my project and need to go looking now for a way to downgrade the extension until I can come up with another way of doing things.

@kayrunm
Copy link
Author

kayrunm commented Nov 16, 2020

Yup, largely in the same boat. Looking at merging three repos for what is largely the same codebase into one, so commits are never going to be the same.

@wwarby thankfully if you go to the Extensions sidebar on VS Code you should be able to click the cog icon for GitLens and then select Install Another Version... — I just downgraded to the most recent version before v11.

@wwarby
Copy link

wwarby commented Nov 16, 2020

That's @kayrunm I found that option just after I posted. At least that turned out to be an easy fix and I'll still with version 10.x until I have a viable alternative. Never occurred to me how vitally important that feature is to my workflow until it disappeared!

@Celeborn2BeAlive
Copy link

Related #1157

@BRaimbault
Copy link

Same situation here, I chose to roll back to 10.2.3 to get the old "Compare Commits" comparing to branches of my choice focusing on differences between files instead of commits history.

@justin-databased
Copy link

I am a little surprised at how few people are in commenting on this haha. This is the only thing that I use Git Lens for. I am chuckling about it now that I installed the previous version but I was swearing like a sailor just about 10 minutes ago. 🤦

@aramando
Copy link

I have this issue too when comparing a branch to master, but it seems to be caused by the branch having been squash-merged to master, then the merge commit reverted; the changes made on the branch before the merge+revert on master are the ones not showing in the GitLens reference comparison, although the files themselves are showing as changed, it's just the diff doesn't show any changes. An equivalent file comparison or PR in Github correctly shows all the changes.

@finn-wa
Copy link

finn-wa commented Nov 17, 2020

I don't mind the Behind/Ahead view and I can imagine it being occasionally useful, but we definitely need a diff view back too. When I'm comparing my local branch to origin, the compare view basically duplicates the new Changes to push/pull section now.
image
I will probably be downgrading to v10 to get this feature back, which is a shame because overall v11 seems really nice!

@Zmaon
Copy link

Zmaon commented Nov 19, 2020

Same here, I use to do most of my code review using this feature. I had to install 10.x for now.

@mfornet
Copy link

mfornet commented Nov 19, 2020

I have same issue, and would love if we have by default file diff between branches rather than Behind / Ahead.

For those struggling with this, a workaround I found (hopefully temporary) is creating a separate branch and squashing all commits, so all differences are shown on that commit (inside Ahead).

@eamodio eamodio added bug Something isn't working and removed question labels Nov 23, 2020
@eamodio eamodio self-assigned this Nov 23, 2020
@eamodio eamodio added this to the Soon™ milestone Nov 23, 2020
@eamodio
Copy link
Member

eamodio commented Nov 23, 2020

Sorry for unintentionally removing this feature 🤦‍♂️. In v11.0.4 I've added back the ability to compare file changes between the references (regardless of ahead/behind).

@Psithief
Copy link

Psithief commented Nov 23, 2020

The files are back, but the "new" and "old" sides of the compare are backwards compared to differences in the "Ahead" commits.

Edit: Backwards compared to the previous implementation.

@eamodio
Copy link
Member

eamodio commented Nov 23, 2020

@Psithief Damn it -- that's what I get for rushing it out without thorough testing. A fix is coming shortly.

@eamodio eamodio removed this from the Soon™ milestone Dec 2, 2020
@github-actions
Copy link

github-actions bot commented Jan 2, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests