From: Steven Penny <svnpenn@gmail.com>
To: git@vger.kernel.org
Cc: Steven Penny <svnpenn@gmail.com>
Subject: [PATCH] git-sh-setup: work around Cygwin path handling gotchas
Date: Wed, 16 May 2012 19:39:42 -0500 [thread overview]
Message-ID: <1337215182-4036-1-git-send-email-svnpenn@gmail.com> (raw)
On Cygwin, tools built for Cygwin can take both Windows-style paths
(e.g. C:/dir/file.txt or C:\dir\file.txt) and Cygwin-style paths
(e.g. /cygdrive/c/dir/file.txt), but Windows-native tools can only take
Windows-style paths. Because the paths that are relative to $GIT_DIR,
e.g. the name of the insn sheet file of the "rebase -i" command, are given
to the programs with $GIT_DIR prefixed, and $GIT_DIR in turn is computed
by calling "pwd", wrap "pwd" to call "cygpath -m" to give a Windows-style
path, in a way similar to how mingw does this.
Signed-off-by: Steven Penny <svnpenn@gmail.com>
---
git-sh-setup.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 7b3ae75..07f54c1 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -260,6 +260,11 @@ case $(uname -s) in
return 1
}
;;
+*CYGWIN*)
+ pwd () {
+ cygpath -m "$PWD"
+ }
+ ;;
*)
is_absolute_path () {
case "$1" in
--
1.7.9
reply other threads:[~2012-05-17 0:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337215182-4036-1-git-send-email-svnpenn@gmail.com \
--to=svnpenn@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).