From: Rene Kita <mail@rkta.de>
To: git@vger.kernel.org
Cc: Jacob Keller <jacob.keller@gmail.com>,
Johannes Sixt <j6t@kdbg.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: git log alias with --all and --exclude
Date: Thu, 5 Sep 2024 07:23:10 +0200 [thread overview]
Message-ID: <20240905052310.GC15670@t480> (raw)
In-Reply-To: <xmqqjzfr87wh.fsf@gitster.g>
On Wed, Sep 04, 2024 at 01:45:50PM -0700, Junio C Hamano wrote:
> Jacob Keller <jacob.keller@gmail.com> writes:
>
> >> > > 'gr = log --oneline --abbrev-commit --all --graph --decorate --color'
> >
> > You could implement this as a shell alias so that your options get
> > included before the --all. I'm not sure how trivial that would be to
> > do, but thats how I would go about implementing this alias.
>
> True. If I were doing this, I would at least do something like
>
> [alias]
> rg = "!sh -c 'git log --oneline --abbrev-commit --graph \
> --decorate --color ${1-\"--all\"} \"$@\"' -"
>
> so that
>
> (1) "git rg" without any argument will default to "--all"
> (2) "git rg --exclude 'wip*' --branches" would work as expected,
> just like "git rg --first-parent master..seen" would.
>
> Thanks.
Thanks for the ideas, I will adjust my alias.
prev parent reply other threads:[~2024-09-05 5:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 9:06 git log alias with --all and --exclude Rene Kita
2024-09-04 16:49 ` Johannes Sixt
2024-09-04 18:08 ` Rene Kita
2024-09-04 19:58 ` Jacob Keller
2024-09-04 20:45 ` Junio C Hamano
2024-09-05 5:23 ` Rene Kita [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=20240905052310.GC15670@t480 \
--to=mail@rkta.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jacob.keller@gmail.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.
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).