From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Rene Kita <mail@rkta.de>, Johannes Sixt <j6t@kdbg.org>,
git@vger.kernel.org
Subject: Re: git log alias with --all and --exclude
Date: Wed, 04 Sep 2024 13:45:50 -0700 [thread overview]
Message-ID: <xmqqjzfr87wh.fsf@gitster.g> (raw)
In-Reply-To: <CA+P7+xo9DnTitgVjHzpW1ODwRdFruDf+g+isg5pSHT8f27ASvg@mail.gmail.com> (Jacob Keller's message of "Wed, 4 Sep 2024 12:58:34 -0700")
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.
next prev parent reply other threads:[~2024-09-04 20:45 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 [this message]
2024-09-05 5:23 ` Rene Kita
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=xmqqjzfr87wh.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=jacob.keller@gmail.com \
--cc=mail@rkta.de \
/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).