From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Filipp Bakanov <filipp@bakanov.su>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Proposal: "unadd" command / alias.
Date: Tue, 27 Oct 2020 18:54:03 -0400 [thread overview]
Message-ID: <20201027225403.GJ5691@mit.edu> (raw)
In-Reply-To: <CAAdniQ4vx4z9KnfvG7thzxf1xBa=P_nnbY1G=RTFUBb4Zxqeaw@mail.gmail.com>
On Wed, Oct 28, 2020 at 01:02:11AM +0300, Filipp Bakanov wrote:
> >> Indeed, I have a similar alias in my ~/.gitconfig
>
> Why not just add it to git by default for everybody? revert-file is
> also ok, anything except `checkout HEAD --` will be good.
Because everyone may have their own favorite aliases? Just because
*I* have the following aliases doesn't mean that everyone else would
find them useful.
[alias]
new = !gitk --all --not ORIG_HEAD
dw = diff --stat --summary
di = diff --stat --summary --cached
dc = describe --contains
revert-file = checkout HEAD --
l = log --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
lr = log --reverse --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
rl = log -g --pretty=format:'%Cred%h%Creset %gd %gs %Cgreen(%gr)%Creset %s' --abbrev-commit
rl1 = log -g --date=relative --pretty=format:'%Cred%h%Creset %gs %Cgreen%gd%Creset %s' --abbrev-commit
lg = log --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
lgt = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
rlt = log -g --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
lgt-nc = log --graph --pretty=format:'%h -%d %s (%cr)' --abbrev-commit
st = status -s
recent = for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'
gerrit-clone = !bash ggh gerrit-clone
start = !bash ggh start
upload = !bash ggh upload
prune-branches = !bash ggh prune-branches
fixes = log -1 --pretty=fixes
I have a huge number of bash aliases, and that doesn't mean everyone
else should have those bash aliases. For that matter, I have the
following in ~/bin/git-rp-ext4 so that I can type "git rp-ext4
tags/ext4_for_linus". But that doesn't mean this script is right for
everyone....
Cheers,
- Ted
#!/bin/sh
START=origin
URL=git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
END=""
print_help ()
{
PROG=$(basename "$0")
echo "Usage: $PROG [-n] [--start <START COMMIT>] [--url <URL] [<END COMMIT>]"
exit 1
}
while [ "$1" != "" ]; do
case $1 in
--start) shift
START="$1"
;;
--url) shift
URL="$1"
;;
-n) NO_ACTION="echo" ;;
-*) print_help ;;
*)
if test -n "$END"
then
print_help
else
END="$1"
fi
;;
esac
shift
done
$NO_ACTION git request-pull "$START" "$URL" "$END"
next prev parent reply other threads:[~2020-10-27 22:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 20:10 Proposal: "unadd" command / alias Filipp Bakanov
2020-10-27 20:32 ` Junio C Hamano
2020-10-27 21:56 ` Theodore Y. Ts'o
2020-10-27 22:02 ` Filipp Bakanov
2020-10-27 22:54 ` Theodore Y. Ts'o [this message]
2020-10-27 23:14 ` Filipp Bakanov
2020-10-28 11:00 ` Philip Oakley
2020-10-28 12:13 ` Konstantin Tokarev
2020-10-28 12:21 ` Filipp Bakanov
2020-10-28 13:07 ` Pratyush Yadav
2020-10-28 13:56 ` Filipp Bakanov
2020-10-28 23:44 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027225403.GJ5691@mit.edu \
--to=tytso@mit.edu \
--cc=filipp@bakanov.su \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).