From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15211 invoked by alias); 22 Nov 2015 23:30:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 15102 invoked by uid 89); 22 Nov 2015 23:30:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: resqmta-po-10v.sys.comcast.net Received: from resqmta-po-10v.sys.comcast.net (HELO resqmta-po-10v.sys.comcast.net) (96.114.154.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 22 Nov 2015 23:30:29 +0000 Received: from resomta-po-18v.sys.comcast.net ([96.114.154.242]) by resqmta-po-10v.sys.comcast.net with comcast id knWR1r0035E3ZMc01nWTXA; Sun, 22 Nov 2015 23:30:27 +0000 Received: from resmail-po-054v.sys.comcast.net ([162.150.176.64]) by resomta-po-18v.sys.comcast.net with comcast id knWT1r00U1PkcJi01nWTws; Sun, 22 Nov 2015 23:30:27 +0000 Date: Sun, 22 Nov 2015 23:30:00 -0000 From: boulderfans@comcast.net To: cygwin@cygwin.com Message-ID: <1271139068.9180259.1448235027708.JavaMail.zimbra@comcast.net> In-Reply-To: <1032375163.9174650.1448234447549.JavaMail.zimbra@comcast.net> Subject: Git issue. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00318.txt.bz2 I've run into a problem when using the --git-dir option in git. It appears to have been introduced since git 2.4.x. Here's an example of the problem using a locally built version (2.6.3) of git with some annotated error output: [/cygdrive/d/projects] $ git --version git version 2.6.3-cyg [/cygdrive/d/projects] $ git --git-dir=d:/projects/git-git/.git config alias.foo ls-files error: Unable to open tempfile: /cygdrive/d/projects/d:/projects/git-git/.git/config.lock error: could not lock config file d:/projects/git-git/.git/config: No such file or directory The problem is that the code that is checking the --git-dir option doesn't work properly if you use a DOS drive:/path specification. I tracked it down to the fact that has_dos_drive_prefix() is not implemented and always returns false. From git-compat-util.h: #ifndef has_dos_drive_prefix static inline int git_has_dos_drive_prefix(const char *path) { return 0; } #define has_dos_drive_prefix git_has_dos_drive_prefix #endif It looks like there is an implementation of the function for a MinGW build (compat/mingw.c) but not for the Cygwin build. There were changes in this area about a year ago, but I'm not exactly sure what changed to cause this problem to appear. Thanks. -Matt -- 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