New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 695623 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

'git cl --help' doesn't work

Project Member Reported by awdf@chromium.org, Feb 23 2017

Issue description

'git cl -h' shows a help message, which is great, but 'git cl --help' (two dashes) does not, despite being listed in the help message given by 'git cl -h' and 'git cl -help'.

I would expect 'git cl --help' to give the same result as 'git cl -h' but instead I get a 'No manual entry for git-cl' error. 

This has caught me out a couple of times now. (Although usually I don't think to try 'git cl -h' and just try 'git cl upload -h' to find out how to change issue number - would be helpful if that info was also given in the git cl upload help text, though appreciate it's a different command, but perhaps it could be part of the 'upload' command too. In general 'git cl upload' is the only 'git cl' command I use other than occasionally wanting to set issue number. I expect it's the same for many others.)


 

Comment 1 by awdf@chromium.org, Feb 23 2017

Description: Show this description

Comment 2 by aga...@chromium.org, Feb 27 2017

Cc: iannucci@chromium.org andyb...@chromium.org
Owner: aga...@chromium.org
Status: Started (was: Untriaged)
I don't think there's any reasonable way for us to make this work exactly the way you ask for. The problem is that git itself parses for the "--help" flag, and automatically translates the call into "man git-cl". Git does the parsing for the --help flag because if the subcommand is broken, it can't guarantee that the subcommand will be able to parse the help flag itself.

We do have some man pages in depot_tools already, and those work (e.g. "git new-branch --help"). So I guess the solution here is to add a man page for git-cl as well. It won't be identical to "git cl -h", but it will be in the same style as "git help branch" and "git help rebase-update".

Here's a first shot at that: https://chromium-review.googlesource.com/447216
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/96dc085dbe897dd19947d46809095fd1067b7e7f

commit 96dc085dbe897dd19947d46809095fd1067b7e7f
Author: Aaron Gable <agable@chromium.org>
Date: Mon Mar 13 21:55:22 2017

Add a manual page for git-cl

The most important git subcommand in depot_tools never had a man
page until today. And now "git help cl" and "git cl --help" will
work.

BUG= 695623 

Change-Id: Ic0d05fa8d70d2ef6e71d58e0d7d3e7adc4a2fa32
Reviewed-on: https://chromium-review.googlesource.com/447216
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/man1/git-upstream-diff.1
[add] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/html/git-cl.html
[add] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/man1/git-cl.1
[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/html/git-squash-branch.html
[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/html/git-upstream-diff.html
[add] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/src/_git-cl_desc.helper.txt
[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/man1/git-squash-branch.1
[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/html/depot_tools.html
[modify] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/man7/depot_tools.7
[add] https://crrev.com/96dc085dbe897dd19947d46809095fd1067b7e7f/man/src/git-cl.txt

Comment 4 by awdf@chromium.org, Mar 14 2017

\o/ thanks for this! 

Comment 5 by aga...@chromium.org, Mar 14 2017

Status: Fixed (was: Started)

Sign in to add a comment