{"thread":{"id":"1810","subject":"getting a list of changes I commited","startedAt":"2005-09-15T18:14:45Z","lastAt":"2005-09-15T18:38:25Z","messageCount":2,"participants":["Luck, Tony","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8614","messageId":"B8E391BBE9FE384DAA4C5C003888BE6F046625FC@scsmsx401.amr.corp.intel.com","threadId":"1810","inReplyTo":null,"subject":"getting a list of changes I commited","fromName":"Luck, Tony","fromEmail":"tony.luck@intel.com","sentAt":"2005-09-15T18:14:45Z","receivedAt":"2005-09-15T18:14:45Z","isPatch":false,"sender":{"key":"tony.luck@intel.com","avatar":"https://avatars.githubusercontent.com/u/5446021?v=4"},"body":"I've been asked whether I can provide e-mail notification\nwhen I take patches into my tree.  I took a look at the\nexisting hooks, and I don't think that I want to do this\nwhen I first make a commit ... sometimes I back these out\nagain if there is a problem when I test.\n\nSo I think that what I want is to produce a list of changes\nthat I commited when I push a new tree out to kernel.org.\nBut ... such a push usually contains lots of flow-through\nchanges that I pulled from Linus ... so a simple:\n\n $ git-rev-list --no-merges newhead ^oldhead\n\ngives a long list of changes.  I'd like to filter out\nall the ones that weren't commited by me.  Is there an\nargument to git-rev-list that will just print the entries\nwhere I'm listed as the commiter, or do I have to use\n\"--pretty-full\" and write a little script to do the trim?\n\nOr is there some other way to do this?\n\n-Tony\n"},{"id":"8617","messageId":"Pine.LNX.4.58.0509151128170.26803@g5.osdl.org","threadId":"1810","inReplyTo":"B8E391BBE9FE384DAA4C5C003888BE6F046625FC@scsmsx401.amr.corp.intel.com","subject":"Re: getting a list of changes I commited","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-15T18:38:25Z","receivedAt":"2005-09-15T18:38:25Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 15 Sep 2005, Luck, Tony wrote:\n> \n> So I think that what I want is to produce a list of changes\n> that I commited when I push a new tree out to kernel.org.\n> But ... such a push usually contains lots of flow-through\n> changes that I pulled from Linus ... so a simple:\n> \n>  $ git-rev-list --no-merges newhead ^oldhead\n> \n> gives a long list of changes.\n\nWhy not just _also_ limit it by what is already merged in my tree?\n\nIe just do\n\n\tgit fetch linus\n\tgit-rev-list --no-merges newhead ^oldhead ^linus\n\nThe problem with your approach:\n\n>\t\t\t\t I'd like to filter out\n> all the ones that weren't commited by me.  Is there an\n> argument to git-rev-list that will just print the entries\n> where I'm listed as the commiter, or do I have to use\n> \"--pretty-full\" and write a little script to do the trim?\n\nThis is what \"--header\" (and it's zero termination) is designed for: you\ncan do\n\n\tgit-rev-list --header --no-merges newhead ^oldhead |\n\t\tgrep -z \"committer .*tony\\.luck\"\n\nand it will give a nice NUL-terminated output list of just your commits. \nNo complex script necessary.\n\nHOWEVER. The reason I suggest adding the ^linus instead is that I suspect\npeople really wants to see the development stuff, and that's what they'd\nget if you just run the script often enough (and daily is certainly often\nenough). Also, the \"grep the committer\" approach fundamentally doesn't\nwork if you ever plan on having sub-lieutenants that work with you and\nthat you use git to merge with.\n\nBut hey, that grep thing certainly works too. The output is trivial to \nparse.\n\n(Oh, and I think \"-z\" is a GNU grep extension.)\n\n\t\t\tLinus\n"}]}