Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 29, 2013 at 3:27 PM, Ramkumar Ramachandra
<artagnon@xxxxxxxxx> wrote:
> Felipe Contreras wrote:
>> We should probably also add typical shortucts:
>>
>> d = diff
>> l = log
>> f = fetch
>> p = push
>> r = reset
>> ci = commit
>> rb = rebase
>> co = checkout
>> st = status
>> pi = cherry-pick
>> mt = mergetool
>
> Terrible idea.

A "terrible idea" that somehow each and every other SCM tool in the planet does.

I don't see Mercurial users demanding that they take their useful
shortcuts away, I see the opposite; they demand useful shortcuts for
Git.

I say it's a terrible idea **not** to do that.

> We'll be eating up more subcommands that the user
> cannot override.

We won't. We can easily implement these as special aliases that the
moment the user specifies something else.

But actually, we don't have to do anything because the current
implementation already does that.

If the user has 'alias.ci=commit -v', and then we specify a default
'alias.ci=commit', the user's configuration takes precedence.

> I'm already unhappy with am not having been called
> apply-mailbox, because I want am to mean am -3 -c (too lazy to write
> those configuration variables).

cat > ~/bin/git-am <<EOF
#!/bin/sh
git am -3 -c "$@"
EOF
chmod +x ~/bin/git-am
echo export GIT_EXEC_PATH=$HOME/bin:$(git --exec-path) >> ~/.profile

Done.

And I don't see what that has to do with default *aliases* the user
can override. This is a red herring.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]