{"thread":{"id":"31363","subject":"Inverting the --committer option to git-log with v1.7.5.4","startedAt":"2012-08-26T22:30:40Z","lastAt":"2012-08-26T22:43:06Z","messageCount":2,"participants":["Todd A. Jacobs","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"197877","messageId":"CAPRhCbuOsiHNOHJUTN8Na9qEqoTAbCb-G41WFscjYhDppKOLGg@mail.gmail.com","threadId":"31363","inReplyTo":"CAPRhCbtfx+kA8BbPwSYcYfvg5S0b6yWP5TqJHD_LCN-CMFw75w@mail.gmail.com","subject":"Inverting the --committer option to git-log with v1.7.5.4","fromName":"Todd A. Jacobs","fromEmail":"nospam+listmail@codegnome.org","sentAt":"2012-08-26T22:30:40Z","receivedAt":"2012-08-26T22:30:40Z","isPatch":false,"sender":{"key":"nospam+listmail@codegnome.org","avatar":null},"body":"I wanted to search a repository for all commits that were *not*\ncommitted by a particular person. While I eventually managed to build\na regular expression that worked for my limited use case, it seems\nlike there ought to be a more sensible way to find the data I'm\nlooking for.\n\nAs an example, this didn't work:\n\n    git log --format=fuller --not --committer=\"Foo Bar\"\n\nApparently, the --not flag doesn't invert the grep for committer; it\nonly inverts the revision specifiers. It seems like there should be\nsomething that works like grep's --invert-match option, but I couldn't\nfind it.\n\nOn the other hand, this will work, but is painful and error-prone to\nbuild if you have a lot of committers:\n\n    # Assuming the address is foo.bar@example.com\n    git log --format=fuller --committer='[^r]@'\n\nIs there currently a better way to request logs for \"everyone but\ncommitter x\" in Git? If not, is this a feature that someone who\nunderstands the Git source might find useful enough to add in?\n"},{"id":"197878","messageId":"7vr4qttgud.fsf@alter.siamese.dyndns.org","threadId":"31363","inReplyTo":"CAPRhCbuOsiHNOHJUTN8Na9qEqoTAbCb-G41WFscjYhDppKOLGg@mail.gmail.com","subject":"Re: Inverting the --committer option to git-log with v1.7.5.4","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-26T22:43:06Z","receivedAt":"2012-08-26T22:43:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Todd A. Jacobs\" <nospam+listmail@codegnome.org> writes:\n\n> Is there currently a better way to request logs for \"everyone but\n> committer x\" in Git? If not, is this a feature that someone who\n> understands the Git source might find useful enough to add in?\n\nNo, there is not.\n\nI wouldn't comment on the potential usefulness of such a feature,\nbut I do not think there is anything fundamentally wrong to enhance\nthe limited form of \"--grep/--author/--committer\" the \"log\" family\nof commands currently support to a full \"grep boolean expressions\"\nthat is supported by \"git grep\" command to let you say something\nlike:\n\n\tgit log --author=rezrov --grep=nitfol \\\n        \t--and \\( --committer=xyzzy --or\t--committer=frotz \\) \\\n\t\t--all --not master\n\nto grab commits from all topics that are not yet merged to 'master',\nauthored by rezrov and talks about nitfol, that are committed either\nby xyzzy or frotz.\n\nThe command line syntax to integrate the \"grep boolean expressions\"\nneeds to be carefully thought out, as \"--not\" on the \"log\" family of\ncommands is already used to mean something entirely different (it is\na revision range operator), though.\n"}]}