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:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Qv3w89V0/6EX5AIf CpaaKo/XPl7ZF1PYOEGbEgDAD5ROBmV47Y7DOwRSJmwGnVXJGbfeIK4u5O37ihIY k+4Ut9SFCxwk0hVpd6tCUZov3yl2sSGySLzQWdA0U02gaVI9gE4zVe6vcxp9+HVt CEGGwwU91US2lddbkfpNohnL8pk= 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:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=OGAC3QxAKwcS1lFzu27fjK 2pZ+M=; b=O8VPTY7WMv4ouo4xZvNYpFpKO8xyh1lNNajdMPZ8x9ZHICu3wcjVy+ jlXdTqt0iWHkvMmjZRnk2+eoTvqNC1O9Rxsj/pmuV4pSxQU5lXzR6lbMIKgvUqgb YpTE86gtsBN1ayd3fh7PHHNRIBTUBCvDB6UODb0LvA9DY+5NeHios= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Eliot, UD:doc, Documents, documents X-HELO: csmail.cs.umass.edu Reply-To: moss AT cs DOT umass DOT edu Subject: Re: git and absolute Windows-style paths References: <57169662 DOT 9060503 AT gmail DOT com> <5717A3EF DOT 6030407 AT gmail DOT com> <5717A5C6 DOT 5060001 AT cs DOT umass DOT edu> To: cygwin AT cygwin DOT com From: Eliot Moss Message-ID: <5717E88E.5050404@cs.umass.edu> Date: Wed, 20 Apr 2016 16:37:34 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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" Regards -- Eliot -- 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