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

Re: [PATCH] help: include list of aliases in git-help --all

From
Joel Nothman <joel.nothman@gmail.com>
Date
Feb 25, 2014, 22:32 UTC
Message-ID
<CAAkaFLX49C5CoXcPL9ZBLvNuHnCNg+0QSMfWLzJ0VU_wxOH5zw@mail.gmail.com>
In-Reply-To
<xmqqk3ci6eun.fsf@gitster.dls.corp.google.com>
On 26 February 2014 08:51, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Joel Nothman <joel.nothman@gmail.com> writes:
>
>> arguments to git help. They are also like commands in that it is
>> possible to forget their name, or whether they are defined on a
>> particular workstation, and to hence want a listing.
>
> I did envision that it would be useful for the last case, but then
> the users would be helped even more if they can get a list of ONLY
> aliases, not buried in many standard commands they already know
> about.

The list is partitioned. It is partitioned already between git-installed commands and others on the path. This patch adds a third partition when required. So they *do* see only aliases... after all the commands.

Note also that any command on the path will override an alias with the same name. So in order to list (effective) aliases, you need to calculate the list of commands as well. If someone defines an alias overridden by a command, git help -a now makes that apparent by excluding the alias and including the command above it, while `git config --get-regexp ^alias` does not.

> In other words, I was not fundamentally opposed to *a* way to get a
> list that includes aliases, but I was not convinced if it is a good
> idea to *change* the output, which people knew would consist of
> commands but not aliases, to suddenly start including aliases.

I don't think this will concern most users for whom aliases are non-existent, and hence no section will be shown.

Previous: Junio C HamanoNext: Philip Oakley
Message 5 of 7 in “help: include list of aliases in git-help --all”
  1. help: include list of aliases in git-help --allJoel Nothman, Feb 25, 2014
  2. Junio C HamanoFeb 25, 2014
  3. Joel NothmanFeb 25, 2014
  4. Junio C HamanoFeb 25, 2014
  5. Joel NothmanFeb 25, 2014
  6. Philip OakleyFeb 25, 2014
  7. Junio C HamanoFeb 25, 2014

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.