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

Re: [PATCH] Support for configurable git command aliases (v2)

From
Junio C Hamano <junkio@cox.net>
Date
Jun 4, 2006, 22:38 UTC
Message-ID
<7v8xoc8s1t.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060604221930.GW10488@pasky.or.cz>
Petr Baudis <pasky@ucw.cz> writes:
Show 15 quoted lines
>
>   Then again, as pointed out on IRC you might get very confused as well
> if you do git log | less. Besides, this is not going to help you with
> aliases like commit = commit -a.
>
>   So, some other possibilities are to:
>
>   (i) Test stdin. Even in scripts, stdin is frequently terminal, but you
> might add </dev/null after each git invocation and get a serious case of
> RSI.
>
>   (ii) Add a --no-alias git argument. This way lies madness, too.
>
>   (iii) Check a $GIT_NO_ALIAS environment variable. This might work
> best, after all. Opinions? Or some other clever idea?
Perhaps the simplest:
    (iv) Refuse/ignore an alias that hides existing command, and
         train users to write portable scripts by not using
         aliases.  E.g. "alias.log = log --pretty=raw" is
         ignored, and you would do "alias.l = log --pretty=raw"
         instead.
Previous: Petr BaudisNext: Linus Torvalds
Message 5 of 12 in “Support for configurable git command aliases (v2)”
  1. Support for configurable git command aliases (v2)Petr Baudis, Jun 4, 2006
  2. Petr BaudisJun 4, 2006
  3. Martin MaresJun 4, 2006
  4. Petr BaudisJun 4, 2006
  5. Junio C HamanoJun 4, 2006
  6. Linus TorvaldsJun 4, 2006
  7. "git --less cmd" to page anywhereJunio C Hamano, Jun 6, 2006
  8. Linus TorvaldsJun 7, 2006
  9. Petr BaudisJun 7, 2006
  10. Linus TorvaldsJun 7, 2006
  11. Martin LanghoffJun 7, 2006
  12. Linus TorvaldsJun 7, 2006

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.