# git and linux kernel source

6 messages from 2007-08-09 to 2007-08-13. Participants: Joe Perches, J. Bruce Fields, Rogan Dawes.
Thread: https://gitlist.dev/t/9460

## Joe Perches, 2007-08-09 23:11

Subject: git and linux kernel source
Message-ID: <1186701106.3073.71.camel@localhost>
URL: https://gitlist.dev/e/1186701106.3073.71.camel%40localhost

```
A few linux kernel source and git questions:

What's the best procedure to handle a tree-wide source tranformation?
For instance:

  git branch foo2bar
  egrep -r -w --include=*.[ch] -l "foo" * | \
	xargs perl -pi -e 's/\bfoo\b/bar/msg'
  git commit -a -m "use bar not foo"

Is there a way to separate the resultant single patch into multiple
patches by subdirectory?  Perhaps some git-rev-parse option?

  git-format-patch -p --stat -o outputdir

Is there a way to automatically include the appropriate MAINTAINER and
mailing lists from the MAINTAINERS file for each subdirectory?

  git-send-mail --to $APPROPRIATE_MAINTAINER \
	-cc linux-kernel@vger.kernel.org

Any ideas or help?

```

## J. Bruce Fields, 2007-08-09 23:17

Subject: Re: git and linux kernel source
Message-ID: <20070809231718.GH12875@fieldses.org>
URL: https://gitlist.dev/e/20070809231718.GH12875%40fieldses.org
In-Reply-To: <1186701106.3073.71.camel@localhost>

```
On Thu, Aug 09, 2007 at 04:11:46PM -0700, Joe Perches wrote:
> A few linux kernel source and git questions:
> 
> What's the best procedure to handle a tree-wide source tranformation?
> For instance:
> 
>   git branch foo2bar
>   egrep -r -w --include=*.[ch] -l "foo" * | \
> 	xargs perl -pi -e 's/\bfoo\b/bar/msg'
>   git commit -a -m "use bar not foo"


> Is there a way to separate the resultant single patch into multiple
> patches by subdirectory?  Perhaps some git-rev-parse option?

Something like

	for each sub/dir:
		git add sub/dir
		git commit -m "use bar not foo in sub/dir"

should do it.  (Of course, in the particular case above the patches you
ended up with probably wouldn't compile individually.)

--b.

```

## Joe Perches, 2007-08-10 01:59

Subject: Re: git and linux kernel source
Message-ID: <1186711187.3073.75.camel@localhost>
URL: https://gitlist.dev/e/1186711187.3073.75.camel%40localhost
In-Reply-To: <20070809231718.GH12875@fieldses.org>

```
On Thu, 2007-08-09 at 19:17 -0400, J. Bruce Fields wrote:
> > Is there a way to separate the resultant single patch into multiple
> > patches by subdirectory?  Perhaps some git-rev-parse option?
> Something like
> 	for each sub/dir:
> 		git add sub/dir
> 		git commit -m "use bar not foo in sub/dir"
> should do it.  (Of course, in the particular case above the patches you
> ended up with probably wouldn't compile individually.)

Nor would it likely survive a git bisect, but it's a start.
My goal is to eventually commit by maintainer.

Thanks, Joe

```

## J. Bruce Fields, 2007-08-13 15:27

Subject: Re: git and linux kernel source
Message-ID: <20070813152714.GF3122@fieldses.org>
URL: https://gitlist.dev/e/20070813152714.GF3122%40fieldses.org
In-Reply-To: <20070809231718.GH12875@fieldses.org>

```
On Thu, Aug 09, 2007 at 07:17:18PM -0400, bfields wrote:
> On Thu, Aug 09, 2007 at 04:11:46PM -0700, Joe Perches wrote:
> > A few linux kernel source and git questions:
> > 
> > What's the best procedure to handle a tree-wide source tranformation?
> > For instance:
> > 
> >   git branch foo2bar
> >   egrep -r -w --include=*.[ch] -l "foo" * | \
> > 	xargs perl -pi -e 's/\bfoo\b/bar/msg'
> >   git commit -a -m "use bar not foo"
> 
> 
> > Is there a way to separate the resultant single patch into multiple
> > patches by subdirectory?  Perhaps some git-rev-parse option?
> 
> Something like
> 
> 	for each sub/dir:
> 		git add sub/dir
> 		git commit -m "use bar not foo in sub/dir"
> 
> should do it.  (Of course, in the particular case above the patches you
> ended up with probably wouldn't compile individually.)

OK, now I feel like I have to ask--you're not seriously considering
doing anything like that, are you?

--b.

```

## Rogan Dawes, 2007-08-13 15:32

Subject: Re: git and linux kernel source
Message-ID: <46C0799A.3090707@dawes.za.net>
URL: https://gitlist.dev/e/46C0799A.3090707%40dawes.za.net
In-Reply-To: <20070813152714.GF3122@fieldses.org>

```
J. Bruce Fields wrote:
> On Thu, Aug 09, 2007 at 07:17:18PM -0400, bfields wrote:
>> On Thu, Aug 09, 2007 at 04:11:46PM -0700, Joe Perches wrote:
>>> A few linux kernel source and git questions:
>>>
>>> What's the best procedure to handle a tree-wide source tranformation?
>>> For instance:
>>>
>>>   git branch foo2bar
>>>   egrep -r -w --include=*.[ch] -l "foo" * | \
>>> 	xargs perl -pi -e 's/\bfoo\b/bar/msg'
>>>   git commit -a -m "use bar not foo"
>>
>>> Is there a way to separate the resultant single patch into multiple
>>> patches by subdirectory?  Perhaps some git-rev-parse option?
>> Something like
>>
>> 	for each sub/dir:
>> 		git add sub/dir
>> 		git commit -m "use bar not foo in sub/dir"
>>
>> should do it.  (Of course, in the particular case above the patches you
>> ended up with probably wouldn't compile individually.)
> 
> OK, now I feel like I have to ask--you're not seriously considering
> doing anything like that, are you?
> 
> --b.

Have you seen LKML recently? Maybe that will answer your question. (A 
500+ patch mail bomb . . .)

Rogan

```

## J. Bruce Fields, 2007-08-13 15:38

Subject: Re: git and linux kernel source
Message-ID: <20070813153803.GG3122@fieldses.org>
URL: https://gitlist.dev/e/20070813153803.GG3122%40fieldses.org
In-Reply-To: <46C0799A.3090707@dawes.za.net>

```
On Mon, Aug 13, 2007 at 05:32:42PM +0200, Rogan Dawes wrote:
> J. Bruce Fields wrote:
>> On Thu, Aug 09, 2007 at 07:17:18PM -0400, bfields wrote:
>>> On Thu, Aug 09, 2007 at 04:11:46PM -0700, Joe Perches wrote:
>>>> A few linux kernel source and git questions:
>>>>
>>>> What's the best procedure to handle a tree-wide source tranformation?
>>>> For instance:
>>>>
>>>>   git branch foo2bar
>>>>   egrep -r -w --include=*.[ch] -l "foo" * | \
>>>> 	xargs perl -pi -e 's/\bfoo\b/bar/msg'
>>>>   git commit -a -m "use bar not foo"
>>>
>>>> Is there a way to separate the resultant single patch into multiple
>>>> patches by subdirectory?  Perhaps some git-rev-parse option?
>>> Something like
>>>
>>> 	for each sub/dir:
>>> 		git add sub/dir
>>> 		git commit -m "use bar not foo in sub/dir"
>>>
>>> should do it.  (Of course, in the particular case above the patches you
>>> ended up with probably wouldn't compile individually.)
>> OK, now I feel like I have to ask--you're not seriously considering
>> doing anything like that, are you?
>> --b.
>
> Have you seen LKML recently? Maybe that will answer your question. (A 500+ 
> patch mail bomb . . .)

Yes.  And it looks like preparation for doing the above kind of
splitting-by-maintainer.  Which may not be a sensible thing to do for a
variety of reasons that I assume people know.  But the patch bomb
suggests I shouldn't make that kind of assumption.

--b.

```
