git diff no longer works in Update Project Info tab

OS X 10.8.3
IntelliJ 12.0.4


When I pull the latest from github, the Update Project Info tab shows the files that have been updated, but when I CMD+D to diff any one of them, the diff window shows the same file on both sides and it says "no differences" on the bottom, which is incorrect. Here's a concrete example:

application.properties is a file that contains our app's version number in a propety called app.version. I have this file open in the editor and it shows 0.8.139. That is the correct value, but when I diff this file from the Update Project Info tab, it shows 0.8.138 on BOTH sides.

I have several other projects which appear to be working correctly and I can't seem to figure out what happened with this one.
25 comments

Really? I'm the only one on the planet experiencing this? It's now happening in both of my main projects. Sometimes it works, sometimes it doesn't. This is almost as frustrating as the miserable performance I'm seeing after upgrading to version 12.

0

I reported a similar issue but it has been fixed for long time: http://youtrack.jetbrains.com/issue/IDEA-91293

Can you spot a pattern when it does not work?

0

Not yet but I'm really trying to find one. I always work with the same 2 projects open, and this has been working fine up until recently.

I just looked at the YouTrack link you posted - I saw that exact bug just yesterday. I saw 2 empty panels and it said "no differences" at the bottom.

0

Does it happen on modified files or just on created or deleted files?
Does it happen for all file types or only for certain ones?
Could you please try IDEA 12.1 EAP and see if the issue persists there? I remember some fixes around this area made in 12.1.

0

It happens on modified files of different types. I just pulled down the latest from github - 15 files were modified. In this particular case, CMD+D works on all of them except two .groovy files which are incorrectly showing "no differences". There is another .groovy file higher up in the list that does show differences, though, so it's definitely not specific to any one file type.

One interesting thing about this most recent pull is that the two files that are showing "no differences" are from a different repository. Both of the projects I work in regularly contain 3 git roots.

I will download and try the 12.1 EAP.

UPDATE: I don't feel comfortable using the 12.1 EAP - it's flagging a bunch of my files as having errors which is incorrect - simply opening the file clears the condition. I'll keep it around to test the diff issue though.

0

Quick update: the problem has not happened at all over the past few days. So strange. (I did see this bug again but only once: http://youtrack.jetbrains.com/issue/IDEA-91293.)

0

Here we go again. Man this is so annoying. Is there any way to find out what IntelliJ is trying to do when it goes to compare these files? Any logging info I can enable, perhaps?

0

IntelliJ uses the Local History to show difference.
Could you please open the problematic file in the editor and invoke VCS | Local History | Show History and attach the screenshot?

Btw, you're using 12.1, right?

0

Thanks, Kirill.

I mentioned previously that I downloaded 12.1 but was unforcomfortable using it because it was incorrectly flagging a large number of my files as having errors, but I see that RC2 has just been posted, so I will download that and report back.



I will still attach the screenshots, though, so you can at least see what I'm talking about. The CMD+D image shows the result of diffing the file in the Update Project Info tab. The local history image is what you requested and correctly shows the difference. Feel free to ignore these until I report back after using 12.1.

Attachment(s):
local history.png
cmd+d.png
0

My first try at diffing from the Update Project Info tab in 12.1 RC2 was a success, but unfortunately IntelliJ is still incorrectly flagging tons of my files as having errors (i.e, they have a red underline... I open the file and it goes away). I'll live with it for now to see if the diff issue is fixed. Would you like me to report this elsewhere or are you guys aware of it?

0

If you have such serious problems with error highlighting, please report it to our bugtracker, and we'll do our best to fix it asap.

0

Will do. It's defintely a problem.

The diff not working is still happening in 12.1, RC2, I'm afraid. I would attach screenshots again, but the ones I attached to my earier post showing the application.properties file are still valid. Same exact problem. 9 files were just pulled down in the latest update: all of them are showing "no differences".

0

So, Paul, as you mentioned earlier, Diff from Update Project Info works for some files, but doen't work for some other ones, right?
You  mentioned groovy and properties files, that doesn't work. Are there more of them? Are these files have registered file types?
And could you please give an example of files that work fine.

0

Kirill, thanks for following up with me. Based on what I've seen so far, the problem doesn't seem to be related to specific file types. But it's intermittent and really difficult to reproduce consistently. Just this morning I pulled down the latest from both of my projects, diff'd a few files, and everything is fine. This is something I do on a daily basis, so I will report back when/if it happens again.

0

Just happened again but the behavior is slightly different this time. I'm currently using 12.1.1 (129.239). I did an Update Project which pulled down 1 file from github. If I diff that file in the Update Project Info tab, I get an empty window that says "Contents are identical" - previously I would see the contents of both files but it would say "no differences" at the bottom. If I then open the file, click Show History, and diff the most recent change from there, I see the differences. Screenshots are attached.

Please let me know if there's anything I can do to help you track this down. It's a tough one because it doesn't happen consistently.  



Attachment(s):
Diff from History.png
Contents Identical.png
0

Just want to report that this is still happening in 12.1.2 (129.354). I just pulled down 3 files and all of them are showing "no differences" when I diff from the Update Project Info tab. Here's one example: note the app.version is 0.4.120 on both sides, yet when I open this file in the editor, it's 0.4.121.

app_version_incorrect.png

I completely understand how difficult this is to track down since it's intermittent and you are probably unable to reproduce it. Please let me know if there's anything I can do to help - I'd be glad to run a special debug build or something if that would help you figure this out.

0

Can somebody please tell me exactly what IntelliJ does when you hit CMD+D in the "Update Project Info" tab to compare files? There is nothing showing up in the Version Control console. This was working great for a while but now it's telling me that the files I just pulled are identical which is incorrect. Note that the content of the "After update" pane is wrong (see attached screenshot) - it's not showing the changes that were just pulled. I've tryed syncing. I've tried to "Refresh File Status". Nothing works.

This is a portion of my screen: the top is the file that I just pulled open in the editor showing a line of code that was added. The bottom is the "diff" window I pulled up from the "Update Project Info" tab.

IntelliJ-project-diff-bug.png

0

Workaround: open file in the editor (F4) and invoke Show Diff again. It should capture the change then.

0

Do you mean to invoke Show Diff from the Update Project Info tab after opening the file in the editor? If so, then I'm afraid that doesn't work. The only way I can see what was changed is to Show History for each file and invoke the diff from there, which is terribly inconvenient.

I don't know if this is useful or not but just now, in another project, I pulled down the latest code and had the same problem I've been describing, but when I opened one of the files that were changed in the editor, it did not immediately show the current content. I viewed the file from the command line to verify this. It wasn't until I switched back to IntelliJ that the editor updated itself.

I wouldn't mind this so much if I had a way to refresh IntelliJ's internal cache (assuming it's a stale cache issue, of course).

Note that this problem only started happening again recently in 13.1.4. I updated to 13.1.5 but it didn't help. I'm running OS X 10.9.5 but I don't believe this is the cause.

0

pbienick wrote:

I don't know if this is useful or not but just now, in another project, I pulled down the latest code and had the same problem I've been describing, but when I opened one of the files that were changed in the editor, it did not immediately show the current content. I viewed the file from the command line to verify this. It wasn't until I switched back to IntelliJ that the editor updated itself.


If this happens again, please try File | Synchronize and see if that updates the editor content with the actual data.

0

Kirill, thanks for your replies... of course now the DIFF feature is working again, but just to let you know that I already tried to File/Synchronize the file in the past when it wasn't working. I'm pretty sure that this will update the editor, but it doesn't help the DIFF issue from the Update Project Info tab. There doesn't seem to be a way around that.

0

Annnd just like that, it stopped working again. Oh how I wish this would get fixed - it's such a useful feature.

0

We've made a couple of fixes for this issue in IDEA 14. Could you please check if you still experience troubles?

0

Thanks for the update, Kirill. So far so good with Idea 14, but sometimes it takes a while for the problem to manifest itself. If I don't experience any problems, I'll make a note to report back in a few weeks. (I'm on vacation next week).

0

Unfortunately the problem is still present in 14.0.1. On this occasion, I was in the process of merging two branches and I switched back and forth between them several times. I believe this may have something to do with it. If I can somehow come up with a series of steps to reproduce the problem reliably, I will certainly let you know.

0

Please sign in to leave a comment.