All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Steven Penny <svnpenn@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: Git commit path vs rebase path
Date: Thu, 17 May 2012 12:19:33 -0700	[thread overview]
Message-ID: <xmqqfwayobsq.fsf@junio.mtv.corp.google.com> (raw)
In-Reply-To: <4FB543B7.6000506@ramsay1.demon.co.uk> (Ramsay Jones's message of "Thu, 17 May 2012 19:30:15 +0100")

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> As you surmised, cygwin does not have this feature. On cygwin you are
> encouraged to use the cygpath utility in scripts. (Also, cygwin does
> provide an API to convert to/from POSIX/win32 paths from your own
> programs. eg. cygwin_conv_to_[full]_win32_path() and cygwin_conv_to_\
> [full]_posix_path().)
> ...
> Just as an exercise, I created a script to use the windows PSPad editor
> (included below), using it to create a commit and also run this rebase:
>
>     GIT_EDITOR=pspad git rebase -i master uname
>
> Both git commands launched the editor (and completed their task) just fine.

So where does the above leave us?

Your message showed a way to "solve" it without changing git, but the
presense of workaround alone is not a good reason not to change git, if
the change makes things better without breaking other things.  I'd like
to know if Steven's patch breaks Cygwin users in other ways.

Steven's message showed that spawning Cygwin programs and feeding paths
in $GIT_DIR to them would not be broken if we start giving GIT_DIR as a
Windows style path inside shell scripted Porcelains.  But will there be
other things that get broken by the change?  An example of what would
worry me is that we define has_drive_prefix() only for compat/mingw.h,
so if somebody exports GIT_DIR back to call the binaries from scripted
Porcelains, it is likely that it would break git running on Cygwin,
where it expects only posix-style paths.  Upon seeing C:/foo/bar.txt, it
will start saying "Ah, that is a relative path" and may end up adding
the $(pwd) in front when it needs to know its absolute path.

  reply	other threads:[~2012-05-17 19:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06  4:24 Git commit path vs rebase path Steven Penny
2012-05-07 17:27 ` Junio C Hamano
2012-05-08  6:22   ` Johannes Sixt
2012-05-08  6:44     ` Steven Penny
2012-05-08  7:06       ` Johannes Sixt
2012-05-08  7:11         ` Steven Penny
2012-05-08 17:02           ` Junio C Hamano
2012-05-08 17:25             ` Junio C Hamano
2012-05-08 22:47               ` Steven Penny
2012-05-09 21:54                 ` Junio C Hamano
2012-05-09 23:14                   ` Steven Penny
2012-05-10 18:10                 ` Ramsay Jones
2012-05-11  4:35                   ` Steven Penny
2012-05-13 22:58                     ` Ramsay Jones
2012-05-13 23:42                       ` Steven Penny
2012-05-14  6:02                       ` Johannes Sixt
2012-05-15 17:32                         ` Ramsay Jones
2012-05-16  5:52                           ` Johannes Sixt
2012-05-17 18:30                             ` Ramsay Jones
2012-05-17 19:19                               ` Junio C Hamano [this message]
2012-05-16 18:00                         ` [PATCH 0/2] " Junio C Hamano
2012-05-16 18:00                           ` [PATCH 1/2] git-sh-setup: define workaround wrappers before they are used Junio C Hamano
2012-05-17 22:36                             ` Ramsay Jones
2012-05-16 18:00                           ` [PATCH 2/2] git-sh-setup: work around Cygwin path handling gotchas Junio C Hamano
2012-05-16 18:51                             ` Steven Penny
2012-05-16 19:02                               ` Junio C Hamano
2012-05-17 23:15                                 ` Ramsay Jones
2012-05-18  2:34                                   ` Junio C Hamano
2012-05-19  0:43                                     ` Steven Penny
2012-05-21 18:43                                     ` Ramsay Jones
2012-05-21 22:24                                       ` Junio C Hamano
2012-05-24 18:27                                         ` Ramsay Jones

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=xmqqfwayobsq.fsf@junio.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=ramsay@ramsay1.demon.co.uk \
    --cc=svnpenn@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.