public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin Git thinks files are changed when they aren't
@ 2015-03-24 21:24 Chloe
  2015-03-25  2:01 ` Yaakov Selkowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chloe @ 2015-03-24 21:24 UTC (permalink / raw)
  To: cygwin

Cygwin Git always thinks files are changed even when they aren't. After 
a commit with a Windows Git, Cygwin Git shows files as modified.

Windows Git
--------------------------
C:\Users\Chloe\workspace\AffiliateArbitrage>git status
On branch master
nothing to commit, working directory clean

C:\Users\Chloe\workspace\AffiliateArbitrage>git --version
git version 1.9.5.msysgit.1
-------------------------

Cygwin Git
-------------------------
$ git status
On branch master
Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working directory)

         modified:   .project
         ... dozens of files ....

$ git --version
git version 2.1.4

$ git diff .project
diff --git a/.project b/.project
old mode 100644
new mode 100755


$ ls -l .project
-rwxrwx---+ 1 Chloe None 574 Mar 10 21:28 .project


$ uname -a
CYGWIN_NT-6.3-WOW xps 1.7.35(0.287/5/3) 2015-03-04 12:07 i686 Cygwin

---------------------------------





--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cygwin Git thinks files are changed when they aren't
  2015-03-24 21:24 Cygwin Git thinks files are changed when they aren't Chloe
@ 2015-03-25  2:01 ` Yaakov Selkowitz
  2015-03-25  6:32   ` Jim Garrison
  2015-03-25  6:34 ` Achim Gratz
  2015-03-25 11:20 ` Frank Fesevur
  2 siblings, 1 reply; 5+ messages in thread
From: Yaakov Selkowitz @ 2015-03-25  2:01 UTC (permalink / raw)
  To: cygwin

On Tue, 2015-03-24 at 16:42 -0400, Chloe wrote:
> Cygwin Git always thinks files are changed even when they aren't. After 
> a commit with a Windows Git, Cygwin Git shows files as modified.
[snip]
> $ git diff .project
> diff --git a/.project b/.project
> old mode 100644
> new mode 100755

This is your answer.  On Windows, everything is executable, so changing
a file with any native Windows program is bound to set the executable
bit.  A change in permissions is considered a modification in git, hence
the message.

To avoid this, you'll probably have to git clone with your Windows git
to start with, as Cygwin programs won't change the permissions unless
you tell them to.

--
Yaakov





--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cygwin Git thinks files are changed when they aren't
  2015-03-25  2:01 ` Yaakov Selkowitz
@ 2015-03-25  6:32   ` Jim Garrison
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Garrison @ 2015-03-25  6:32 UTC (permalink / raw)
  To: cygwin

On 3/24/2015 5:50 PM, Yaakov Selkowitz wrote:
> On Tue, 2015-03-24 at 16:42 -0400, Chloe wrote:
>> Cygwin Git always thinks files are changed even when they aren't. After 
>> a commit with a Windows Git, Cygwin Git shows files as modified.
> [snip]
>> $ git diff .project
>> diff --git a/.project b/.project
>> old mode 100644
>> new mode 100755
> 
> This is your answer.  On Windows, everything is executable, so changing
> a file with any native Windows program is bound to set the executable
> bit.  A change in permissions is considered a modification in git, hence
> the message.
> 
> To avoid this, you'll probably have to git clone with your Windows git
> to start with, as Cygwin programs won't change the permissions unless
> you tell them to.

See http://stackoverflow.com/questions/1580596

git config core.fileMode false


-- 
Jim Garrison (jhg@acm.org)
PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cygwin Git thinks files are changed when they aren't
  2015-03-24 21:24 Cygwin Git thinks files are changed when they aren't Chloe
  2015-03-25  2:01 ` Yaakov Selkowitz
@ 2015-03-25  6:34 ` Achim Gratz
  2015-03-25 11:20 ` Frank Fesevur
  2 siblings, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2015-03-25  6:34 UTC (permalink / raw)
  To: cygwin

Chloe writes:
> Cygwin Git always thinks files are changed even when they
> aren't. After a commit with a Windows Git, Cygwin Git shows files as
> modified.

Then either don't mix Cygwin's and whatever Windows' Git you're using or
tell Git to ignore the mode bits altogether (check the documentation for
global.filemode in git-config).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cygwin Git thinks files are changed when they aren't
  2015-03-24 21:24 Cygwin Git thinks files are changed when they aren't Chloe
  2015-03-25  2:01 ` Yaakov Selkowitz
  2015-03-25  6:34 ` Achim Gratz
@ 2015-03-25 11:20 ` Frank Fesevur
  2 siblings, 0 replies; 5+ messages in thread
From: Frank Fesevur @ 2015-03-25 11:20 UTC (permalink / raw)
  To: cygwin

2015-03-24 21:42 GMT+01:00 Chloe:
> Cygwin Git always thinks files are changed even when they aren't. After a
> commit with a Windows Git, Cygwin Git shows files as modified.
> [snip]
> $ git diff .project
> diff --git a/.project b/.project
> old mode 100644
> new mode 100755

Apart from the file mode already mentioned, don't forget that Windows
based git uses CRLF as line endings where Cygwin git uses LF as
default line ending (like a Linux based git). Could lead to "modified"
files as well. I avoid mixed the two as much as possible. I use Cygwin
git to do all the real operations and use TortoiseGit (together with
Windows based git) just to see in the Windows Explorer what is
happening in my directories. There is a tweak introduced in the most
recent TortoiseGit to use Cygwin git, but have tried that yet.

Regards,
Frank

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-25  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 21:24 Cygwin Git thinks files are changed when they aren't Chloe
2015-03-25  2:01 ` Yaakov Selkowitz
2015-03-25  6:32   ` Jim Garrison
2015-03-25  6:34 ` Achim Gratz
2015-03-25 11:20 ` Frank Fesevur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).