Re: git log alias with --all and --exclude
- From
- Rene Kita <mail@rkta.de>
- Date
- Sep 4, 2024, 18:08 UTC
- Message-ID
- <20240904180826.GB15670@t480>
- In-Reply-To
- <0e0fb1c3-d4f7-413b-9985-d71cb1c300df@kdbg.org>
On Wed, Sep 04, 2024 at 06:49:12PM +0200, Johannes Sixt wrote:
Show 20 quoted lines
> 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 >