{"thread":{"id":"8252","subject":"git log -S problem","startedAt":"2007-05-20T19:15:39Z","lastAt":"2007-05-21T07:34:42Z","messageCount":4,"participants":["Johannes Sixt","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"42770","messageId":"200705202115.39325.johannes.sixt@telecom.at","threadId":"8252","inReplyTo":null,"subject":"git log -S problem","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2007-05-20T19:15:39Z","receivedAt":"2007-05-20T19:15:39Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"There is something odd with -S of git log. Try this in your git.git:\n\n$ git log --pretty=oneline -Sbuiltin-merge-base -- Makefile \n71dfbf224ff980f4085f75868dc409118418731e Make merge-base a built-in.\n\n$ git log --pretty=oneline -Smerge-base -- Makefile\ne468305a954d95a26bfcdec3bc6e4bd477d95676 [PATCH] Remove the explicit ...\na3df180138b85a603656582bde6df757095618cf Rename git core commands ...\ncef661fc799a3a13ffdea4a3f69f1acd295de53d Add support for alternate ...\ne590d694ead8d50c2afc7086161d4ddc5d907655 Add more header dependencies.\n6683463ed6b2da9eed309c305806f9393d1ae728 Do a very simple \"merge-base\"...\n\n$ git version\ngit version 1.5.2\n\nI had expected that the set of commits found by the second search string are a \nproper superset of those found by the first one. What's wrong here? Why does \na search for 'merge-base' not find occurences of 'builtin-merge-base'?\n\n-- Hannes\n"},{"id":"42792","messageId":"7vy7jjjjdm.fsf@assigned-by-dhcp.cox.net","threadId":"8252","inReplyTo":"200705202115.39325.johannes.sixt@telecom.at","subject":"Re: git log -S problem","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-20T21:05:41Z","receivedAt":"2007-05-20T21:05:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <johannes.sixt@telecom.at> writes:\n\n> There is something odd with -S of git log. Try this in your git.git:\n>\n> $ git log --pretty=oneline -Sbuiltin-merge-base -- Makefile \n> 71dfbf224ff980f4085f75868dc409118418731e Make merge-base a built-in.\n>\n> $ git log --pretty=oneline -Smerge-base -- Makefile\n> e468305a954d95a26bfcdec3bc6e4bd477d95676 [PATCH] Remove the explicit ...\n> a3df180138b85a603656582bde6df757095618cf Rename git core commands ...\n> cef661fc799a3a13ffdea4a3f69f1acd295de53d Add support for alternate ...\n> e590d694ead8d50c2afc7086161d4ddc5d907655 Add more header dependencies.\n> 6683463ed6b2da9eed309c305806f9393d1ae728 Do a very simple \"merge-base\"...\n>\n> $ git version\n> git version 1.5.2\n>\n> I had expected that the set of commits found by the second search string are a \n> proper superset of those found by the first one. What's wrong here? Why does \n> a search for 'merge-base' not find occurences of 'builtin-merge-base'?\n\n71dfbf224 removes one line that has \"git-merge-base$X\" and adds\none line that has \"builtin-merge-base.o\".  If you count the\nnumber of occurences of substring \"builtin-merge-base\" in the\npreimage and the postimage, you see one addition.  If you count\nthe same for substring \"merge-base\", the net difference is 0.\n"},{"id":"42840","messageId":"200705210727.23898.johannes.sixt@telecom.at","threadId":"8252","inReplyTo":"7vy7jjjjdm.fsf@assigned-by-dhcp.cox.net","subject":"Re: git log -S problem","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2007-05-21T05:27:23Z","receivedAt":"2007-05-21T05:27:23Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Sunday 20 May 2007 23:05, Junio C Hamano wrote:\n> Johannes Sixt <johannes.sixt@telecom.at> writes:\n> > I had expected that the set of commits found by the second search string\n> > are a proper superset of those found by the first one. What's wrong here?\n> > Why does a search for 'merge-base' not find occurences of\n> > 'builtin-merge-base'?\n>\n> 71dfbf224 removes one line that has \"git-merge-base$X\" and adds\n> one line that has \"builtin-merge-base.o\".  If you count the\n> number of occurences of substring \"builtin-merge-base\" in the\n> preimage and the postimage, you see one addition.  If you count\n> the same for substring \"merge-base\", the net difference is 0.\n\nBut is this how -S is *designed* to work? \n\nHm, the documentation says (diff-options.txt):\n\n-S<string>::\n\tLook for differences that contain the change in <string>.\n\nwhich can be interpreted both to match my expectations as well as the current \nimplementation.\n\n-- Hannes\n"},{"id":"42857","messageId":"7vmyzyfx4d.fsf@assigned-by-dhcp.cox.net","threadId":"8252","inReplyTo":"200705210727.23898.johannes.sixt@telecom.at","subject":"Re: git log -S problem","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-21T07:34:42Z","receivedAt":"2007-05-21T07:34:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <johannes.sixt@telecom.at> writes:\n\n> On Sunday 20 May 2007 23:05, Junio C Hamano wrote:\n>> Johannes Sixt <johannes.sixt@telecom.at> writes:\n>> > I had expected that the set of commits found by the second search string\n>> > are a proper superset of those found by the first one. What's wrong here?\n>> > Why does a search for 'merge-base' not find occurences of\n>> > 'builtin-merge-base'?\n>>\n>> 71dfbf224 removes one line that has \"git-merge-base$X\" and adds\n>> one line that has \"builtin-merge-base.o\".  If you count the\n>> number of occurences of substring \"builtin-merge-base\" in the\n>> preimage and the postimage, you see one addition.  If you count\n>> the same for substring \"merge-base\", the net difference is 0.\n>\n> But is this how -S is *designed* to work? \n\nhttp://thread.gmane.org/gmane.comp.version-control.git/14869/focus=14871\n\nFor the design background, \n\nhttp://thread.gmane.org/gmane.comp.version-control.git/6214\n"}]}