[0/3] git-p4: Usability enhancements
mbox series

Message ID pull.675.git.git.1575901009.gitgitgadget@gmail.com
Headers show
Series
  • git-p4: Usability enhancements
Related show

Message

Derrick Stolee via GitGitGadget Dec. 9, 2019, 2:16 p.m. UTC
Some user interaction with git-p4 is not as user-friendly as the rest of the
Git ecosystem. Here are three areas that can be improved on:

1) When a patch fails and the user is prompted, there is no sanitization of
the user input so for a "yes/no" question, if the user enters "YES" instead
of a lowercase "y", they will be re-prompted to enter their answer. 

Commit 1 addresses this by sanitizing the user text by trimming and
lowercasing their input before testing. Now "YES" will succeed!

2) Git can handle scraping the RCS Keyword expansions out of source files
when it is preparing to submit them to P4. However, if the config value
"git-p4.attemptRCSCleanup" isn't set, it will just report that it fails.

Commit 2 adds a helpful suggestion, that the user might want to set
git-p4.attemptRCSCleanup.

3) If the command line arguments are incorrect for git-p4, the program
reports that there was a syntax error, but doesn't show what the correct
syntax is.

Commit 3 displays the context help for the failed command.

Ben Keene (3):
  git-p4: [usability] yes/no prompts should sanitize user text
  git-p4: [usability] RCS Keyword failure should suggest help
  git-p4: [usability] Show detailed help when parsing options fail

 git-p4.py | 43 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 37 insertions(+), 6 deletions(-)


base-commit: 083378cc35c4dbcc607e4cdd24a5fca440163d17
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-675%2Fseraphire%2Fseraphire%2Fp4-usability-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-675/seraphire/seraphire/p4-usability-v1
Pull-Request: https://github.com/git/git/pull/675

Comments

Junio C Hamano Dec. 9, 2019, 10:06 p.m. UTC | #1
"Ben Keene via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Some user interaction with git-p4 is not as user-friendly as the rest of the
> Git ecosystem. Here are three areas that can be improved on:

Sorry, but I am not a git-p4 person and I barely speak passable
Python, so I am not a great reviewer for the initial round of any
patch in this area.  IOW it is not all that useful to Cc me, as
opposed to somebody who have been working with git-p4 code longer
and more deeply.

    $ git shortlog --no-merges --since=2.years git-p4.py

may be a good way to choose whom we would want to ask for an initial
round of review (and Luke, who I consider the de-facto git-p4 person,.
is Cc'ed).

Thanks.