This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: introduction, fix for npm w.r.t. git, and questions


On Wed, Apr 20, 2016 at 11:17:35PM +0200, silverwind wrote:
> On 4/20/16 10:59 PM, Adam Dinwoodie wrote:
> >native Windows and Cygwin.  It's been a while since I tried it, but I
> >_think_ you can generally use Cygwin Git and Windows Git on the same
> >working copy without any difficulties, at least if you avoid the common
> >pain points like line ending rewriting and symlinks.
> 
> I've tried the native Windows version of git while debugging this,
> and yes, it accepts Windows-style paths correctly.
> 
> The deal-breaking issue with it for me was that it trashed the file
> permissions under Cygwin. Every file it touched (be it through
> clone, add or any other operation) was set to mode 777, so `git
> config core.fileMode false` would've been necessary to stay sane,
> but that of course comes with the drawback of not being able to
> change file modes.

Yes, that's definitely a catch; Windows seems to like to have executable
flags on more-or-less everything.

You can, if necessary, change filemodes with `git update-index
--chmod=+x <file>` (or `--chmod=-x` to remove the executable flag);
that'll stage the change to be committed when you run `git commit`,
without touching the permissions on the actual checked out files.
You're still not changing the file modes on the files you have checked
out, but you're at least making the change for anyone else who uses your
commits.

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]