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

Re: [PATCH] Let git remote accept up as alias to update

From
Jeff King <peff@peff.net>
Date
Dec 14, 2008, 11:25 UTC
Message-ID
<20081214112501.GD6499@coredump.intra.peff.net>
In-Reply-To
<20081213181704.20126.4200.stgit@zaytsev.su>
On Sat, Dec 13, 2008 at 09:18:56PM +0300, Alexey Zaytsev wrote:
Show 6 quoted lines
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> ---
> 
> Don't know why, but I keep typing remote up instead of
> remote update. As update is probably by far the most
> used remote action, can we please have this alias?

Hmm. The usual answer for requests like this is "make your own alias". But usually they are for primary command aliases (e.g., "co" for "checkout"), and this is a sub-command. So you are actually stuck doing:

  git config alias.rup "remote update"

which is maybe better (even less typing) but is not exactly what you asked for.

I think even nicer than an explicit "up" alias would be to accept any prefix as long as it was unique. However, I think a scheme like that would only make sense if it was used fairly universally, and the current code is not amenable to doing it for regular commands (it doesn't actually have a complete list of commands -- it just tries to exec what you tell it). However, it could be refactored to do so.

-Peff
Previous: Alexey Zaytsev
Message 2 of 2 in “Let git remote accept up as alias to update”
  1. Let git remote accept up as alias to updateAlexey Zaytsev, Dec 13, 2008
  2. Jeff KingDec 14, 2008

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.