Working Copy file appears as "unmodified file"

Adam Seitz June 29, 2014

I have a file that when I change it, it appears in the working copy changes as an "unmodified file". When it is actually unmodified, though, it doesn't appear in the working copy changes list.

I have the Working Copy thing set to "Show pending", so it shouldn't show an unmodified file, yet this file appears as "unmodified", when I know that it is? Does anyone know why it does not show me the changes? Please ask if you need more details.

1 answer

1 accepted

1 vote
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2014

The scenario you describe will always occur if you make whitespace changes, but have you SourceTree diff viewer configured to ignore whitespace.

Checking the "ignore whitespace" option only effects the display of the diff - Git still perceives the file as modified.

If whitespace changes aren't the culprit, please let us know what type of file you are dealing with and what changes you are making.

Adam Seitz July 1, 2014

Thanks for the quick reply!

Unfortunately I'm changing more than the whitespace -- it seems to occur with any change I make to the file. It's a large XML file (about 40k lines, 6.2 MB) that looks something like this throughout:

...
	<String _locID ='75065'>8 Huamincas</String>
	<String _locID ='75066'>6 Huamincas</String>
	<String _locID ='75067'>9 Huamincas</String>
	...

Adding lines, deleting lines, and changing lines all results in the same "unmodified file" issue. I made a copy of the file and gave it a different name to see if it would behave the same, and it does, so it must be something about the file's contents, and not some kind of issue with git mistracking that particular file path or something. The large size was suspect to me, but I have a larger XML (170k lines, 6.5 MB) that is working fine.

Here's a download link to the entire file in question:

http://www.mediafire.com/view/9azyvt6456c36ov/stringtabley.xml

Thanks again for your help.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2014

Try opening the terminal and running a git diff command on the file. In previous questions, Atlassian employees have asserted that they are merely rending the output of that command.

It is possible git diff is choking on the size of the file, but you may get an error message that will be helpful.

Adam Seitz July 1, 2014
PS C:\...\mod > git diff HEAD -- "data\stringtabley.xml"

diff --git a/data/stringtabley.xml b/data/stringtabley.xml

index 4ed62ee..de6f294 100644

Binary files a/data/stringtabley.xml and b/data/stringtabley.xml differ

So oddly, it seems to be regarding it as a binary file. Some Googling reveals Git won't recognize UTF-16, so I just converted to UTF-8; I don't think I really had any reason to be using UTF-16.

Thanks for your help!

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2014

Thanks for sharing the solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events