All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Kita <mail@rkta.de>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: git log alias with --all and --exclude
Date: Wed, 4 Sep 2024 20:08:26 +0200	[thread overview]
Message-ID: <20240904180826.GB15670@t480> (raw)
In-Reply-To: <0e0fb1c3-d4f7-413b-9985-d71cb1c300df@kdbg.org>

On Wed, Sep 04, 2024 at 06:49:12PM +0200, Johannes Sixt wrote:
> Am 04.09.24 um 11:06 schrieb Rene Kita:
> > I have an alias
> > 'gr = log --oneline --abbrev-commit --all --graph --decorate --color'
> > and I would like to be able to sometimes exclude a branch, so call it
> > with:
> > $ git gr --exclude=pattern
> > 
> > This does not work, though. Also does not work without the alias and
> > typing the complete command by hand. Apparently the --exclude must be
> > put before the --all to take effect.
> 
> That is very much by design, so that you can express "branches except
> the wip and preview branches and remotes except those from the remote
> archive" with
> 
> --exclude=wip/* --exclude=preview* --branches --exclude=archive/* --remotes
> 
> These collective branch options --branches, --remotes, and --all clear
> the exclude patterns after having them applied. Therefore, in this example,
> the first two --exclude do not affect --remotes.

OK, certainly not the answer I hoped for, but something I still
expected. Thanks for the explanation.

> -- Hannes
> 

  reply	other threads:[~2024-09-04 18:14 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 [this message]
2024-09-04 19:58     ` Jacob Keller
2024-09-04 20:45       ` Junio C Hamano
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=20240904180826.GB15670@t480 \
    --to=mail@rkta.de \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.