git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git alias and --help

From
Miles Bader <miles@gnu.org>
Date
Oct 28, 2011, 18:25 UTC
Message-ID
<CADCnXoaPbCK0B=XZwdAY=yEb61YhvyQ6FA=BAxkADJ6hra-_Lg@mail.gmail.com>
In-Reply-To
<7v62j9t2gj.fsf@alter.siamese.dyndns.org>
2011/10/29 Junio C Hamano <gitster@pobox.com>:
Show 9 quoted lines
>    $ git lgf --help
>    'git lgf' is aliased to 'log --oneline --boundary --first-parent'
>
> with "git log --help", but that is aiming too low for my taste.
>
> If you are redesigning the help system, isn't it a shame that you are
> discarding other tokens in the alias when giving help? Wouldn't it be
> wonderful if you extracted the option descriptions for these three options
> specified and showing only that, for example?

I think that would be the wrong thing in most cases though: an alias like the above happily allows the user to specify other git-log options on the command line; when I get help on an aliased option, it's often precisely because I want to see the _other_ options I can use...

E.g., I have:
   $ git slog --help
   `git slog' is aliased to `log --date=short --pretty=tformat:"%h
%ad  %s" --abbrev-commit'

But the typical question I want to answer is something like "OK, how do I reverse the output order of slog?" or "how do I limit the output of slog to a certain date range?"

-miles
-- 
Cat is power.  Cat is peace.
Previous: Junio C HamanoNext: Gelonida N
Message 13 of 14 in “git alias and --help”
  1. Gelonida NOct 27, 2011
  2. Junio C HamanoOct 27, 2011
  3. Junio C HamanoOct 27, 2011
  4. Gelonida NOct 28, 2011
  5. Miles BaderOct 28, 2011
  6. Junio C HamanoOct 28, 2011
  7. Michael J GruberOct 28, 2011
  8. Gelonida NOct 28, 2011
  9. Jakub NarebskiOct 28, 2011
  10. Gelonida NOct 28, 2011
  11. Jakub NarebskiOct 28, 2011
  12. Junio C HamanoOct 28, 2011
  13. Miles BaderOct 28, 2011
  14. Gelonida NOct 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.