delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/28/16:14:23

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <33047124.post@talk.nabble.com>
Date: Wed, 28 Dec 2011 13:14:00 -0800 (PST)
From: cxira <teh DOT pigmonkey AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Distributed Git not compiled under Cygwin?
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I noticed when using the Git that is distributed under the Cygwin setup (Git
v1.7.5.1-1) that, when creating a new repository, the core.filemode local
setting is set to true. Being under Windows, this should be false because of
how file permissions are handled. I started digging through the Git source,
and found this:

builtin/init-db.c:15
  #ifdef NO_TRUSTABLE_FILEMODE
  #define TEST_FILEMODE 0
  #else
  #define TEST_FILEMODE 1
  #endif

builtin/init-db.c:259
  git_config_set("core.filemode", filemode ? "true" : "false");

This is where Git intelligently sets the filemode setting under a new
project, but it depends on the NO_TRUSTABLE_FILEMODE preprocessor
definition. Looking further, I found it here:

Makefile:936
  ifeq ($(uname_O),Cygwin)
    ...
    NO_TRUSTABLE_FILEMODE = UnfortunatelyYes

So as you can see, if uname -o is equal to Cygwin, it sets this flag which
in turn correctly causes Git to set filemode to false when a new repository
is created. To confirm, I built the source myself under Cygwin, and sure
enough, creating a new repository sets the filemode setting to false. Just
to be clear here, the version of Git that I built is working as intended,
whereas the version of Git that is distributed through the Cygwin setup is
not.

My question is this: Why is the git package that is distributed with Cygwin
not built as I have above? Is there somewhere more formal to submit this to
have it reviewed? I feel it is something important that should be included,
as I'm not a fan of installing 20 dependencies just to build Git correctly
on every system I use Cygwin on.
-- 
View this message in context: http://old.nabble.com/Distributed-Git-not-compiled-under-Cygwin--tp33047124p33047124.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019