git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Let git remote accept up as alias to update
Date: Sun, 14 Dec 2008 06:25:01 -0500	[thread overview]
Message-ID: <20081214112501.GD6499@coredump.intra.peff.net> (raw)
In-Reply-To: <20081213181704.20126.4200.stgit@zaytsev.su>

On Sat, Dec 13, 2008 at 09:18:56PM +0300, Alexey Zaytsev wrote:

> 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

      reply	other threads:[~2008-12-14 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-13 18:18 [PATCH] Let git remote accept up as alias to update Alexey Zaytsev
2008-12-14 11:25 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081214112501.GD6499@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=alexey.zaytsev@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).