git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Inverting the --committer option to git-log with v1.7.5.4
       [not found] <CAPRhCbtfx+kA8BbPwSYcYfvg5S0b6yWP5TqJHD_LCN-CMFw75w@mail.gmail.com>
@ 2012-08-26 22:30 ` Todd A. Jacobs
  2012-08-26 22:43   ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Todd A. Jacobs @ 2012-08-26 22:30 UTC (permalink / raw
  To: Git Mailing List

I wanted to search a repository for all commits that were *not*
committed by a particular person. While I eventually managed to build
a regular expression that worked for my limited use case, it seems
like there ought to be a more sensible way to find the data I'm
looking for.

As an example, this didn't work:

    git log --format=fuller --not --committer="Foo Bar"

Apparently, the --not flag doesn't invert the grep for committer; it
only inverts the revision specifiers. It seems like there should be
something that works like grep's --invert-match option, but I couldn't
find it.

On the other hand, this will work, but is painful and error-prone to
build if you have a lot of committers:

    # Assuming the address is foo.bar@example.com
    git log --format=fuller --committer='[^r]@'

Is there currently a better way to request logs for "everyone but
committer x" in Git? If not, is this a feature that someone who
understands the Git source might find useful enough to add in?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inverting the --committer option to git-log with v1.7.5.4
  2012-08-26 22:30 ` Inverting the --committer option to git-log with v1.7.5.4 Todd A. Jacobs
@ 2012-08-26 22:43   ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-08-26 22:43 UTC (permalink / raw
  To: Todd A. Jacobs; +Cc: Git Mailing List

"Todd A. Jacobs" <nospam+listmail@codegnome.org> writes:

> Is there currently a better way to request logs for "everyone but
> committer x" in Git? If not, is this a feature that someone who
> understands the Git source might find useful enough to add in?

No, there is not.

I wouldn't comment on the potential usefulness of such a feature,
but I do not think there is anything fundamentally wrong to enhance
the limited form of "--grep/--author/--committer" the "log" family
of commands currently support to a full "grep boolean expressions"
that is supported by "git grep" command to let you say something
like:

	git log --author=rezrov --grep=nitfol \
        	--and \( --committer=xyzzy --or	--committer=frotz \) \
		--all --not master

to grab commits from all topics that are not yet merged to 'master',
authored by rezrov and talks about nitfol, that are committed either
by xyzzy or frotz.

The command line syntax to integrate the "grep boolean expressions"
needs to be carefully thought out, as "--not" on the "log" family of
commands is already used to mean something entirely different (it is
a revision range operator), though.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-26 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAPRhCbtfx+kA8BbPwSYcYfvg5S0b6yWP5TqJHD_LCN-CMFw75w@mail.gmail.com>
2012-08-26 22:30 ` Inverting the --committer option to git-log with v1.7.5.4 Todd A. Jacobs
2012-08-26 22:43   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).