delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/04/21/09:11:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=tv
QRdqDPY+UYzoJnUPvll9L4eh7VmX4vBuDCo1Vu5UIWz1ekf8syqknRmtljDhy3+i
QZBy72cwahpJuWrmpYZEspfKOgJEZ0uMiuunUspUJ/83uVXzk0c1J2GyQ/8GITO7
qmDro6YH7FZLAFWnI0ftjmb3yv2jE5OJImokCbIHs=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=kYAcwKw8
v/gFQKhtEKzjKcBD+7o=; b=E3/ojR3xdfUfI2VkuWmjolr3k1qsNowgaPX0kmJP
yqXkBVVIu8V1UJ4E8zRGe17R5Xt6mpnWVm2nxnxE0AFJ/soas+v0bmgqtRfibc94
bberk6p7bIyXHpaMmZwIhWk+NjrzZdn/OH7IH3cok3C3BqCl5YF9h3ic2Ju4iFBb
OCk=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=DOS, H*i:sk:5718136, H*f:sk:5718136, age
X-HELO: mail-wm0-f54.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=O4nmXtHaT3UHWAGFQTnZOKfeOwiLI3z90fpZgAEB2c4=; b=hbQIwewidXbeAC/Css27NosjS1pCA5C/PbyeJfH0+Ls+RseH4MFjNxinPolzsdTD5h 0sV8yXKp3YvgNMU4UE6rNwrIG+ltb4fS1RHK8nFENj6iLAm+VpObVXBauhkiAmgTrhOo lmJ6XjgNogsF3joXqzQntzexIWEgxojYxozm/oAau82XuqDR93HEhUnx6jDWQjOaQ3X+ caHPoV1c/rW8ARLfxvw+cTyAAB8ZEw5WPS9YJs4TmappqmY5WpniK/j+klUwkXzNjfdL sNFzHbCxx1WSS+fWajpY9BcWdbFGtABXu7b9kr5JCBOuMuiXu5ySKtQpk2DidTsuAYH5 T6nA==
X-Gm-Message-State: AOPr4FXknc4OoJxVamtE2LYqLvcHFkCza9yLqc6HhXQLlPc48dIa6IZTfh4jK4uuKyQIyJfLh8RzXHPUIQHIFQ==
MIME-Version: 1.0
X-Received: by 10.28.129.209 with SMTP id c200mr10522570wmd.38.1461244265811; Thu, 21 Apr 2016 06:11:05 -0700 (PDT)
In-Reply-To: <57181360.2090408@cs.umass.edu>
References: <57169662 DOT 9060503 AT gmail DOT com> <e8b47924c6ff4f07993627dbb26f7066 AT ntmaexbe04 DOT bedford DOT progress DOT com> <5717A3EF DOT 6030407 AT gmail DOT com> <5717A5C6 DOT 5060001 AT cs DOT umass DOT edu> <BLUPR03MB23017F9B3FCB1DEDA3F7734DF6D0 AT BLUPR03MB230 DOT namprd03 DOT prod DOT outlook DOT com> <5717E88E DOT 5050404 AT cs DOT umass DOT edu> <57180D5A DOT 8020300 AT raelity DOT com> <57181360 DOT 2090408 AT cs DOT umass DOT edu>
Date: Thu, 21 Apr 2016 14:11:05 +0100
Message-ID: <CAOYw7dtdK0pmGSggbF8o+Ng7r-dYvsZPgxvTT5yRKRuqDR+xsA@mail.gmail.com>
Subject: Re: git and absolute Windows-style paths
From: Ray Donnelly <mingw DOT android AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Here's a patch for git 2.8.1 that I wrote for MSYS2 to address the
same issue. Because I'd read this thread before I started working on
it (and generally since it's good to) I kept it in mind to make it
work for Cygwin in-case you wanted to use it:

https://raw.githubusercontent.com/Alexpux/MSYS2-packages/6b7aceea4ad2e5bd28143a2de8c4a0d7453013dc/git/git-2.8.1-Cygwin-Allow-DOS-paths.patch

I'm running the test-suite now which takes an age, but I don't see any
problems with it so far. I didn't add any tests covering using DOS
paths though. I've tested it with git add and clone with DOS relative
and absolute paths.

Best regards,

Ray.

On Thu, Apr 21, 2016 at 12:40 AM, Eliot Moss <moss AT cs DOT umass DOT edu> wrote:
> On 4/20/2016 7:14 PM, Ernie Rael wrote:
>>
>> On 4/20/2016 1:37 PM, Eliot Moss wrote:
>>>
>>> I think this will do it:
>>>
>>> function git {
>>>   declare -a ARGS
>>>   for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done
>>>   command git "${ARGS[@]}"
>>> }
>>>
>>> The reason this is a little more complicated than some other approaches
>>> might be is that it will also work for arguments that have space, e.g.,
>>>
>>> git add "C:/My Documents/foo.doc"
>>
>>
>> Notice that
>>     IFS=$'\n'; args=($(cygpath -m -- "$@")); IFS=$' \t\n'
>> also handles arguments with spaces. You don't need the shell for loop.
>
>
> Ok ... but I would save the previous value of IFS and restore it -- never
> know what a user might be using there ...
>
> Best -- E
>
>
> --
> 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
>

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