Am 12.01.2017 um 01:17 schrieb Jacob Keller:
From: Jacob Keller <jacob.kel...@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

Reply via email to