Re: [PATCH 5/5] describe: teach describe negative pattern matches
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 12, 2017, 13:45 UTC
- Message-ID
- <5f723a0d-623f-bf97-00de-29d430484fed@kdbg.org>
- In-Reply-To
- <20170112001721.2534-6-jacob.e.keller@intel.com>
Am 12.01.2017 um 01:17 schrieb Jacob Keller:
Show 13 quoted lines
> From: Jacob Keller <jacob.keller@gmail.com> > > Teach git-describe the `--discard` option which will allow specifying > a glob pattern of tags to ignore. This can be combined with the > `--match` patterns to enable more flexibility in determining which tags > to consider. > > For example, suppose you wish to find the first official release tag > that contains a certain commit. If we assume that official release tags > are of the form "v*" and pre-release candidates include "*rc*" in their > name, we can now find the first tag that introduces commit abcdef via: > > git describe --contains --match="v*" --discard="*rc*"
I have a few dozen topic branches, many of them are work in progress and named wip/something. To see the completed branches, I routinely say
gitk --exclude=wip/* --branches
these days.
It would be great if you could provide the same user interface here. The example in the commit message would then look like this:
git describe --contains --exclude="*rc*" --match="v*"
(I'm not saying that you should add --branches, but that you should prefer --exclude over --discard. Also, the order of --exclude and --match would be important.)
-- Hannes