{"thread":{"id":"21097","subject":"search branches which contain a blob id","startedAt":"2009-09-30T12:38:30Z","lastAt":"2009-09-30T13:43:12Z","messageCount":2,"participants":["Reto Glauser","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"124030","messageId":"8a906e45ab8e0252a0be11e4d4e9389e@blinkeye.ch","threadId":"21097","inReplyTo":null,"subject":"search branches which contain a blob id","fromName":"Reto Glauser","fromEmail":"linux@blinkeye.ch","sentAt":"2009-09-30T12:38:30Z","receivedAt":"2009-09-30T12:38:30Z","isPatch":false,"sender":{"key":"linux@blinkeye.ch","avatar":null},"body":"To get a list of branches which contain a specific commit we use:\n\n$ git branch --contains <commit id>\n\nIs there a similar way to get a list of branches with respect to a\nspecific blob (e.g. the actual code change a commit introduces)? \n\nObvious use-case: One isn't interested in the commit information (author,\nparent, date) but merely in the set of changes a commit introduces.\n"},{"id":"124031","messageId":"1164C259-0573-4F27-990C-743C6710EA59@dbservice.com","threadId":"21097","inReplyTo":"8a906e45ab8e0252a0be11e4d4e9389e@blinkeye.ch","subject":"Re: search branches which contain a blob id","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2009-09-30T13:43:12Z","receivedAt":"2009-09-30T13:43:12Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"\nOn Sep 30, 2009, at 2:38 PM, Reto Glauser wrote:\n\n> To get a list of branches which contain a specific commit we use:\n>\n> $ git branch --contains <commit id>\n>\n> Is there a similar way to get a list of branches with respect to a\n> specific blob (e.g. the actual code change a commit introduces)?\n\nBlob == contents of a file. To see what code changed you need to  \ncompare two blobs (or trees).\n\n> Obvious use-case: One isn't interested in the commit information  \n> (author,\n> parent, date) but merely in the set of changes a commit introduces.\n\ngit log -S'string to search for'\n\nsearches the history for commits which introduced or removed that  \nstring from a file.\n\nOr 'git log -p', if you want to see the diff alongside the other  \ninformation that log gives you.\n\ntom\n"}]}