git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ben Keene <seraphire@gmail.com>
To: Luke Diamand <luke@diamand.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Users <git@vger.kernel.org>,
	Ben Keene via GitGitGadget <gitgitgadget@gmail.com>
Subject: Re: [PATCH 0/2] Feature: New Variable git-p4.binary
Date: Thu, 14 Nov 2019 15:16:49 -0500	[thread overview]
Message-ID: <CAAvvW8R4ZDofFaptW60=QvuSXRFS4U7zdNRGfUcE4iynRDrhFg@mail.gmail.com> (raw)
In-Reply-To: <CAE5ih7-_ZESWAGAiXL4vT-P0aVYtrOAHn6dbhsfTmmeKVkSUWA@mail.gmail.com>

On Thu, Nov 14, 2019 at 4:52 AM Luke Diamand <luke@diamand.org> wrote:
>
> On Thu, 14 Nov 2019 at 02:36, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > "Ben Keene via GitGitGadget" <gitgitgadget@gmail.com> writes:
> >
> > > Issue: Using git-p4.py on Windows does not resolve properly to the p4.exe
> > > binary in all instances.
> > >
> > > Two new code features are added to resolve the p4 executable location:
> > >
> > >  1. A new variable, git-p4.binary, has been added that takes precedence over
> > >     the default p4 executable name. If this git option is set and the
> > >     path.exists() passes for this file it will be used as executable for the
> > >     system.popen calls.
> > >
> > >
> > >  2. If the new variable git-p4.binary is not set, the program checks if the
> > >     operating system is Windows. If it is, the executable is changed to
> > >     'p4.exe'. All other operating systems
> > >     (those that do not report 'Windows' in the platform.system() call)
> > >     continue to use the current executable of 'p4'.
> >
> > I do not use Windows nor git-p4, but the above two changes make
> > sense to me at the design level.  One thing that needs to be updated
> > is the configuration variable, though.  It is more in line with the
> > other parts of the system to name this "git-p4.program", because
> > binary-ness does not matter much to you, as long as the named thing
> > works correctly as "p4" program replacement.
> >
> > Seeing "gpg.program" is used in a similar way, it also is tempting
> > to call it "p4.program", but no other parts of Git other than
> > "git-p4" uses P4, and the "git-p4." prefix is to collect variables
> > related to "git-p4" together, so calling it "p4.program" may not be
> > a good idea---it would hurt discoverability.  "git-p4.p4program"
> > may be OK, if we anticipate that git-p4 may need to use (and its
> > users need to specify paths to) external programs other than "p4",
> > but it probably is overkill.
> >
> > Thanks.
>
> There's some trailing whitespace in 98bae, can we get that tidied up?
>
> Otherwise, modulo Junio's comments, it looks good.
>
> I agree that "git-p4.binary" might be harder to discover ("Oh, I
> assumed that enabled binary mode!"). p4program should be fine.

I have updated the Pull Request to change the variable name from
'binary' to 'p4program'.  I have also updated the PR description.

Here's the new commit message:

Issue: Using git-p4.py on Windows does not resolve properly to the
p4.exe binary in all instances.

Changes since v1:
Commit: (dc6817e) 2019-11-14

Renamed the variable "git-p4.binary" to "git-p4.p4program"

v1:

Two new code features are added to resolve the p4 executable location:

A new variable, git-p4.binary, has been added that takes precedence
over the default
p4 executable name. If this git option is set and the path.exists()
passes for this file
it will be used as executable for the system.popen calls.

If the new variable git-p4.binary is not set, the program checks if
the operating system
is Windows. If it is, the executable is changed to 'p4.exe'. All other
operating systems
(those that do not report 'Windows' in the platform.system() call)
continue to use the
current executable of 'p4'.

  reply	other threads:[~2019-11-14 20:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 21:14 [PATCH 0/2] Feature: New Variable git-p4.binary Ben Keene via GitGitGadget
2019-11-13 21:14 ` [PATCH 1/2] Cast byte strings to unicode strings in python3 Ben Keene via GitGitGadget
2019-11-13 21:14 ` [PATCH 2/2] Added general variable git-p4.binary and added a default for windows of 'P4.EXE' Ben Keene via GitGitGadget
2019-11-14  2:36 ` [PATCH 0/2] Feature: New Variable git-p4.binary Junio C Hamano
2019-11-14  9:53   ` Luke Diamand
2019-11-14 20:16     ` Ben Keene [this message]
2019-11-15  9:28       ` Luke Diamand
2019-11-15 14:42 ` [PATCH v2 0/3] Feature: New Variable git-p4.p4program Ben Keene via GitGitGadget
2019-11-15 14:42   ` [PATCH v2 1/3] Cast byte strings to unicode strings in python3 Ben Keene via GitGitGadget
2019-11-16  2:40     ` Junio C Hamano
2019-11-16  3:52       ` Junio C Hamano
2019-11-15 14:42   ` [PATCH v2 2/3] Added general variable git-p4.binary and added a default for windows of 'P4.EXE' Ben Keene via GitGitGadget
2019-11-16  2:50     ` Junio C Hamano
2019-11-15 14:42   ` [PATCH v2 3/3] Changed the name of the parameter from git-p4.binary to git-p4.p4program Ben Keene via GitGitGadget
2019-11-16  2:40   ` [PATCH v2 0/3] Feature: New Variable git-p4.p4program Junio C Hamano
2019-11-18  1:15     ` Junio C Hamano
2019-12-03 15:59       ` Ben Keene

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAvvW8R4ZDofFaptW60=QvuSXRFS4U7zdNRGfUcE4iynRDrhFg@mail.gmail.com' \
    --to=seraphire@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=luke@diamand.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).