# Merge, rebase and whitespace fixes

5 messages from 2009-06-29 to 2009-06-30. Participants: Giuseppe Bilotta, Rogan Dawes.
Thread: https://gitlist.dev/t/19967

## Giuseppe Bilotta, 2009-06-29 19:18

Subject: Merge, rebase and whitespace fixes
Message-ID: <cb7bb73a0906291218m3ba43109s35cad87efc5161a7@mail.gmail.com>
URL: https://gitlist.dev/e/cb7bb73a0906291218m3ba43109s35cad87efc5161a7%40mail.gmail.com

```
Hello all,

recently a tree I've been working on received some thorough whitespace
adjustments (changing indents from spaces to tabs). This results in
annoying conflicts when running merges or rebases with my local
branches. I tried googling around but I couldn't find any helpful
hints on how to make git cope with this. Any suggestions?

-- 
Giuseppe "Oblomov" Bilotta

```

## Rogan Dawes, 2009-06-29 21:30

Subject: Re: Merge, rebase and whitespace fixes
Message-ID: <4A493287.20106@dawes.za.net>
URL: https://gitlist.dev/e/4A493287.20106%40dawes.za.net
In-Reply-To: <cb7bb73a0906291218m3ba43109s35cad87efc5161a7@mail.gmail.com>

```
Giuseppe Bilotta wrote:
> Hello all,
> 
> recently a tree I've been working on received some thorough whitespace
> adjustments (changing indents from spaces to tabs). This results in
> annoying conflicts when running merges or rebases with my local
> branches. I tried googling around but I couldn't find any helpful
> hints on how to make git cope with this. Any suggestions?
> 

Do the same thing to your own tree?

```

## Giuseppe Bilotta, 2009-06-30 07:37

Subject: Re: Merge, rebase and whitespace fixes
Message-ID: <cb7bb73a0906300037w6b61cae0jeecd2f97b1095b17@mail.gmail.com>
URL: https://gitlist.dev/e/cb7bb73a0906300037w6b61cae0jeecd2f97b1095b17%40mail.gmail.com
In-Reply-To: <4A493287.20106@dawes.za.net>

```
On Mon, Jun 29, 2009 at 11:30 PM, Rogan Dawes<lists@dawes.za.net> wrote:
> Giuseppe Bilotta wrote:
>> Hello all,
>>
>> recently a tree I've been working on received some thorough whitespace
>> adjustments (changing indents from spaces to tabs). This results in
>> annoying conflicts when running merges or rebases with my local
>> branches. I tried googling around but I couldn't find any helpful
>> hints on how to make git cope with this. Any suggestions?
>>
>
> Do the same thing to your own tree?

I tried doing the whitespace cleanup on top of the last patch, but the
merge still conflicted.

The interesting thing is that there's patchset from Robert Fitzsimons
that goes back to August 2005 (!) that does a couple of git apply
cleanups and in particular adds the --ignore-whitespace option that I
would need ...

http://permalink.gmane.org/gmane.comp.version-control.git/7876

but the patch apparently never made it into mainline ...

-- 
Giuseppe "Oblomov" Bilotta

```

## Rogan Dawes, 2009-06-30 09:03

Subject: Re: Merge, rebase and whitespace fixes
Message-ID: <4A49D4C5.8090700@dawes.za.net>
URL: https://gitlist.dev/e/4A49D4C5.8090700%40dawes.za.net
In-Reply-To: <cb7bb73a0906300037w6b61cae0jeecd2f97b1095b17@mail.gmail.com>

```
Giuseppe Bilotta wrote:
> On Mon, Jun 29, 2009 at 11:30 PM, Rogan Dawes<lists@dawes.za.net> wrote:
>> Giuseppe Bilotta wrote:
>>> Hello all,
>>>
>>> recently a tree I've been working on received some thorough whitespace
>>> adjustments (changing indents from spaces to tabs). This results in
>>> annoying conflicts when running merges or rebases with my local
>>> branches. I tried googling around but I couldn't find any helpful
>>> hints on how to make git cope with this. Any suggestions?
>>>
>> Do the same thing to your own tree?
> 
> I tried doing the whitespace cleanup on top of the last patch, but the
> merge still conflicted.
> 
> The interesting thing is that there's patchset from Robert Fitzsimons
> that goes back to August 2005 (!) that does a couple of git apply
> cleanups and in particular adds the --ignore-whitespace option that I
> would need ...
> 
> http://permalink.gmane.org/gmane.comp.version-control.git/7876
> 
> but the patch apparently never made it into mainline ...
> 

One thing I have done in the past when trying to merge two diverged
trees was to format each commit in each tree to a common standard.

One of the ways in which the trees had diverged was whitespace
(non-meaningful) changes, so I used the Eclipse formatter as part of a
"git filter-branch" script to make sure that I was ony looking at
meaningful changes between the trees at each point. This significantly
simplified the process.

Rogan

```

## Giuseppe Bilotta, 2009-06-30 09:18

Subject: Re: Merge, rebase and whitespace fixes
Message-ID: <cb7bb73a0906300218k64e23bc1uf9e1ab72c2819e24@mail.gmail.com>
URL: https://gitlist.dev/e/cb7bb73a0906300218k64e23bc1uf9e1ab72c2819e24%40mail.gmail.com
In-Reply-To: <4A49D4C5.8090700@dawes.za.net>

```
On Tue, Jun 30, 2009 at 11:03 AM, Rogan Dawes<lists@dawes.za.net> wrote:
>> I tried doing the whitespace cleanup on top of the last patch, but the
>> merge still conflicted.
>>
>> The interesting thing is that there's patchset from Robert Fitzsimons
>> that goes back to August 2005 (!) that does a couple of git apply
>> cleanups and in particular adds the --ignore-whitespace option that I
>> would need ...
>>
>> http://permalink.gmane.org/gmane.comp.version-control.git/7876
>>
>> but the patch apparently never made it into mainline ...
>>
>
> One thing I have done in the past when trying to merge two diverged
> trees was to format each commit in each tree to a common standard.
>
> One of the ways in which the trees had diverged was whitespace
> (non-meaningful) changes, so I used the Eclipse formatter as part of a
> "git filter-branch" script to make sure that I was ony looking at
> meaningful changes between the trees at each point. This significantly
> simplified the process.

I can also reply all the patches manually, of course, but the question
is: why should I be doing something manually when it can be done
programmatically?

BTW, I tried updating Robert's patch to the new code base, but it's
WAY too different ...

-- 
Giuseppe "Oblomov" Bilotta

```
