From: Junio C Hamano <gitster@pobox.com>
To: Mark Levedahl <mlevedahl@gmail.com>
Cc: git@vger.kernel.org, adam@dinwoodie.org, me@yadavpratyush.com,
johannes.schindelin@gmx.de
Subject: Re: [PATCH v0 0/4] Remove obsolete Cygwin support from git-gui
Date: Sun, 25 Jun 2023 08:46:26 -0700 [thread overview]
Message-ID: <xmqqwmzr5yul.fsf@gitster.g> (raw)
In-Reply-To: <e04e28e2-2308-1db8-9462-5f81aeff1155@gmail.com> (Mark Levedahl's message of "Sun, 25 Jun 2023 07:26:11 -0400")
Mark Levedahl <mlevedahl@gmail.com> writes:
> So, the code under the is_Windows and is_Cygwin branches of the
> if/else trees are now completely independent, and the is_Windows
> branch is never entered on Cygwin.
I missed this hunk in your updated get_explorer in [2/4]
proc get_explorer {} {
- if {[is_Cygwin] || [is_Windows]} {
+ if {[is_Windows]} {
set explorer "explorer.exe"
} elseif {[is_MacOSX]} {
set explorer "open"
and saw only this in [3/4]
proc get_explorer {} {
if {[is_Windows]} {
set explorer "explorer.exe"
+ } elseif {[is_Cygwin]} {
+ set explorer "/bin/cygstart.exe --explore"
} elseif {[is_MacOSX]} {
set explorer "open"
} else {
As I missed the earlier change, the latter one alone looked to me
that for get_explorer to be share with GfW, the only explanation was
that is_Windows yields true on Cygwin, in which case the new elseif
did not make sense.
I think the hunk in [2/4] should be removed; it is confusing, it
does not have anything to do with the theme of [2/4], which is to
"remove obsolete Cygwin specific code". And instead [3/4] should
be updated to do
+ if {[is_Cygwin] || [is_Windows]} {
- if {[is_Windows]} {
... do windows thing ...
+ } elseif {[is_Cygwin]} {
+ ... do Cygwin thing ...
} elseif {[is_MacOSX]} {
... do macOS thing ...
The earlier explanation in the cover letter says this:
The existing code for file browsing and creating a desktop icon is
shared with Git For Windows support, and uses Windows pathnames. This
code does not work on Cygwin, and needs replacement. These functions
have not worked since 2012.
If the change for get_explorer is updated to read like so, then "was
shared with GfW, now we have one that is for Cygwin" starts making
sense for the file browsing.
But I still do not understand the issue with desktop icon, though.
do_windows_shortcut and do_cygwin_shortcut were separate proc before
this series---while I fully believe that do_cygwin_shortcut did not
work on modern Cygwin if you say so, and "uses Windows pathnames"
may be what makes the original implementation not work on modern
Cygwin, I do not see how the existing code for the desktop icon "is
shared with GfW".
Ah, this is again due to the suboptimal splitting of the patches.
The original does have do_cygwin_shortcut, but you remove it in step
[2/4], together with its caller. The code before your series did
have its own do_cygwin_shortcut, but after [2/4] it and its caller
are removed. The code may not have worked before step [2/4], so it
is probably alright in the end, but it does make step [4/4] very
confusing. Since [4/4] does need to add Cygwin specific code,
perhaps you should exclude the shortcut related change from [2/4]
and keep it focused on removing Cygwin specific code that will not
be used in the end (instead of getting fixed to keep it alive).
So, earlier I said [2/4] made sense and obviously good. But not
anymore. It does a bit too many things and then have later steps
compensate for it, which made reviewing the series harder than
necessary. It needs to be cleaned up a bit, I think.
Thanks.
next prev parent reply other threads:[~2023-06-25 15:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-24 21:23 [PATCH v0 0/4] Remove obsolete Cygwin support from git-gui Mark Levedahl
2023-06-24 21:23 ` [PATCH v0 1/4] git gui Makefile - remove Cygwin modiifications Mark Levedahl
2023-06-24 21:23 ` [PATCH v0 2/4] git-gui - remove obsolete Cygwin specific code Mark Levedahl
2023-06-25 2:56 ` Eric Sunshine
2023-06-25 11:29 ` Mark Levedahl
2023-06-24 21:23 ` [PATCH v0 3/4] git-gui - use cygstart to browse on Cygwin Mark Levedahl
2023-06-24 21:23 ` [PATCH v0 4/4] git-gui - use mkshortcut " Mark Levedahl
2023-06-24 23:30 ` [PATCH v0 0/4] Remove obsolete Cygwin support from git-gui Junio C Hamano
2023-06-24 23:35 ` Junio C Hamano
2023-06-25 11:28 ` Mark Levedahl
2023-06-25 11:26 ` Mark Levedahl
2023-06-25 12:10 ` Mark Levedahl
2023-06-25 15:46 ` Junio C Hamano [this message]
2023-06-25 17:01 ` Mark Levedahl
2023-06-26 15:52 ` Junio C Hamano
2023-06-26 16:55 ` Mark Levedahl
2023-06-26 16:53 ` [PATCH v1 " Mark Levedahl
2023-06-26 16:53 ` [PATCH v1 1/4] git gui Makefile - remove Cygwin modifications Mark Levedahl
2023-06-26 16:53 ` [PATCH v1 2/4] git-gui - remove obsolete Cygwin specific code Mark Levedahl
2023-06-26 16:53 ` [PATCH v1 3/4] git-gui - use cygstart to browse on Cygwin Mark Levedahl
2023-06-26 16:53 ` [PATCH v1 4/4] git-gui - use mkshortcut " Mark Levedahl
2023-06-27 11:51 ` [PATCH v1 0/4] Remove obsolete Cygwin support from git-gui Johannes Schindelin
2023-06-27 17:52 ` Junio C Hamano
2023-08-05 14:47 ` Mark Levedahl
2023-08-24 15:54 ` Pratyush Yadav
2023-08-29 16:03 ` Mark Levedahl
2023-08-29 16:18 ` Junio C Hamano
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=xmqqwmzr5yul.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adam@dinwoodie.org \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=me@yadavpratyush.com \
--cc=mlevedahl@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 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).