Jump to content

[Q] Local changes in specific file but I don't see any


Guest astriconX

Recommended Posts

Hoi,

i'm working with GIT since some time and mostly all is ok but there is one problem that get me crazy. I didn't found any useable results via search (not only here).

I'm not sure how I got this problem but it results in the following:

I normaly working under Windows with GIT GUI.

I can write patches, merge, revert ect. without no problems.

But now (I had this situation a few month ago but "solved" it by creating a new clean mangos dir) there apear the "contrib/dbcEditer/bin/BcdEditer.ini" with local changes.

The crazy fact ist that it has no changes. I can't see any....

I also tried to copy two new "BcdEditer.ini" into the dir (one from github and one from an other working dir on my system). But nothing happend. GIT still say it has local changes.

If I take a look at the diff it looks like this:

@@ -1,313 +1,313 @@
-[FactionGroup.dbc]
-ColType3=2
-[spell.dbc]
...
-ColTitle9=box z
-ColTitle10=box orientation
+[FactionGroup.dbc]
+ColType3=2
+[spell.dbc]
...
+ColTitle9=box z
+ColTitle10=box orientation

If i discard the changes and reload or take a look into GITK they come back...

I commit the "changes" and then reset them - but after that there apear the diff again "local changes, not commited".

Don't know why. X.x

If I type git status into bash I get:

modified: contrib/dbcEditer/bin/BcdEditer.ini

With all other files, and patches anything is ok. Only this file causes problems. Maybe there could be others but I can't directly reproduce this effect. It happens without any possible explination for me.

Example:

I have the bad "BcdEditer.ini" and a littel change in some other file (here Makefile.am).

A diff could be:

diff --git a/Makefile.am b/Makefile.am
index 3bf0ad9..5a39ba8 100644
@@ -19,6 +19,8 @@
## Sub-directories to parse
SUBDIRS = dep doc sql src

+# only a test
+
## Additional files to include when running 'make dist'
# Win32 project workspace for Visual Studio .NET 2003
EXTRA_DIST = \\
diff --git a/contrib/dbcEditer/bin/BcdEditer.ini b/contrib/dbcEditer/bin/BcdEditer
index a9159ec..100029b 100644
--- a/contrib/dbcEditer/bin/BcdEditer.ini
+++ b/contrib/dbcEditer/bin/BcdEditer.ini
@@ -1,313 +1,313 @@
-[FactionGroup.dbc]
-ColType3=2
-[spell.dbc]
...
-ColTitle9=box z
-ColTitle10=box orientation
+[FactionGroup.dbc]
+ColType3=2
+[spell.dbc]
...
+ColTitle9=box z
+ColTitle10=box orientation

And git status say:

modified: Makefile.am
modified: contrib/dbcEditer/bin/BcdEditer.ini

Now I click version->discard changes in GIT GUI. First for "Makefile.am". It's gone. Then for "BcdEditer.ini". It seems that it has also gone. But now I klick version->reload and "BcdEditer.ini" is back.

And it is totally equal if there are real changes in "BcdEditer.ini" or my "invisible" changes. After discarding changes I get the diff "delete all and add the same again" (see first code tag). o.O

Yes, I could make a new dir for MaNGOS. And yes, I also could simply add the diff as a patch and I could work "normally". But the basic problem still exists: I can't see any changes but it told me there are some...

Why? :D

Sorry for longer text. ;)

Hope someone could tell me why GIT is doing that....

PS: i work with german GIT GUI / GITK so sorry, if not all of my "translations" are 100% correctly.

*hope not overlook a basic thing that leads to this problem* :P

Thanks for reading!

Link to comment
Share on other sites

Perhaps the difference is in whitespace. Have you tried a diff with -b or -w ?

Whitespace could also be LF vs. CRLF.

This guy is almost right.

Yes, it's most likely the CRLF thing if the diff looks like "deleting everything and adding it again". Check your msysgit version and autocrlf=true option in msysgit global conf (seatch for "gitconfig" file in program files\\msysgit).

But this should work by default. The problem arises if you have a tree already checked out and git thinks it's clear. Deleting the whole working tree (= everything except .git) and restoring it from the object database (= hard reset for example) should work.

Such problem can pop up when you apply a patch which adds code with LF endings instead of CRLF (on win) with autocrlf=true in config.

Try git diff --check on that range as well.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use