M Hickford <mirth.hickford@xxxxxxxxx> writes: > Hi. Is it possible to exclude tagged commits from a revision range? A so called "revision range" is a set of commits that are defined by reachability from two sets of commits, one "positive set" and one "negative set". A commit is in the "revision range" if and only if it is reachable from one or more commits in the positive set but it is not reachable from any commit in the negative set. > I tried > > git log --exclude=ref/tags/v* v2.3.0..v2.4.0 "--exclude" only affects the selection of "positive set" commits via globbing operators like "--all". When you say "git log --all", the tips of all refs are thrown into the "positive set", but with the --exclude=<glob>, the refs that match <glob> pattern are not thrown into the "positive set". As you have no "--all" or "--glob", it has no effect. Your "positive set" consists of the commit tagged as v2.4.0 and your "negative set" has the commit tagged as v2.3.0. As "revision range" is a set operation (i.e. compute "the set of all commits that are reachable from any commits in the negative set", and "the set of all commits that are reachable from any commits in the positive set", and subtract the former from the latter), skipping arbitrary commit in the middle, like this one wants to do: > git log --oneline --decorate v2.3.0..v2.4.0 | grep --invert-match "tag: v" would generally be impossible to do. If you want to omit, say, v2.3.5, that is reachable from v2.4.0, and can reach v2.3.0, but cannot be reached from v2.3.0, "excluding" it by throwing it into the "negative set" would also omit anything reachable from it.