# Ignoring boring lines(that do not contain information) in git diff

2 messages from 2012-10-08 to 2012-11-26. Participants: Peter Oberndorfer.
Thread: https://gitlist.dev/t/31751

## Peter Oberndorfer, 2012-10-08 16:44

Subject: Ignoring boring lines(that do not contain information) in git diff
Message-ID: <507302DC.4030207@arcor.de>
URL: https://gitlist.dev/e/507302DC.4030207%40arcor.de

```
Hi,

is there a way to tell git diff about lines that are uninteresting?
I mean lines which do not contain a lot of information and
appear several times in pre and post image.

For example whitespace or language dependent stuff like.
{
}
END_IF;
END_FOR;
end sub

I have seen diffs that containing 2 interesting hunks splitted by such 
boring lines.
(I have attached a anonymized version of a real world example where this 
happens)

I think the diff would be clearer when this boring line was added to the 
surrounding hunks.
I already tried patience diff but in my test case it changed nothing.
I am using git 1.7.10.

Thanks,
Greetings Peter




diff --git a/Source/Frobble/Blabber.txt b/Source/Frobble/Blabber.txt
index 87ccddb..627bc3e 100644
--- a/Source/Frobble/Blabber.txt
+++ b/Source/Frobble/Blabber.txt
@@ -138,73 +138,74 @@ END_VAR
-         //frobble immediately if immediately flag is set
-         IF bImmediately AND NOT Array[i].bDisabled THEN
-            aFrobble(i, Entry);
+         IF Entry.bBlah THEN
+               Alarm.Alarm  := SomeAlarm;
+         ELSE
+               Alarm := Entry;
          END_IF;
          
-         // signal if frobble count has changed
-         iChanged := iChanged + 1;
-         EXIT;
+         IF Array[i].Alarm = Alarm THEN
+            //do not brabble if alarm is gobbled
+               EXIT;
+         END_IF;
       END_IF;
-   END_FOR;
-ELSE
-   aExample(Name := 'aaa',
-            ID1 := 1);
-END_IF;
+   ELSE
+      //entry not found, adding
```

## Peter Oberndorfer, 2012-11-26 20:35

Subject: Re: Ignoring boring lines(that do not contain information) in git diff
Message-ID: <50B3D29A.2070805@arcor.de>
URL: https://gitlist.dev/e/50B3D29A.2070805%40arcor.de
In-Reply-To: <507302DC.4030207@arcor.de>

```
On 2012-10-08 18:44, Peter Oberndorfer wrote:
> Hi,
>
> is there a way to tell git diff about lines that are uninteresting?
> I mean lines which do not contain a lot of information and
> appear several times in pre and post image.
>
> For example whitespace or language dependent stuff like.
> {
> }
> END_IF;
> END_FOR;
> end sub
>
> I have seen diffs that containing 2 interesting hunks splitted by such boring lines.
> (I have attached a anonymized version of a real world example where this happens)
>
> I think the diff would be clearer when this boring line was added to the surrounding hunks.
> I already tried patience diff but in my test case it changed nothing.
> I am using git 1.7.10.
>

Hi,

does anybody have a idea if this is possible?
Or some comments if they would find such a feature useful?

Greetings Peter


example_diff_boring_split.diff

diff --git a/Source/Frobble/Blabber.txt b/Source/Frobble/Blabber.txt
index 87ccddb..627bc3e 100644
--- a/Source/Frobble/Blabber.txt
+++ b/Source/Frobble/Blabber.txt
@@ -138,73 +138,74 @@ END_VAR
-         //frobble immediately if immediately flag is set
-         IF bImmediately AND NOT Array[i].bDisabled THEN
-            aFrobble(i, Entry);
+         IF Entry.bBlah THEN
+               Alarm.Alarm  := SomeAlarm;
+         ELSE
+               Alarm := Entry;
          END_IF;
-         // signal if frobble count has changed
-         iChanged := iChanged + 1;
-         EXIT;
+         IF Array[i].Alarm = Alarm THEN
+            //do not brabble if alarm is gobbled
+               EXIT;
+         END_IF;
       END_IF;
-   END_FOR;
-ELSE
-   aExample(Name := 'aaa',
-            ID1 := 1);
-END_IF;
+   ELSE
+      //entry not found, adding

```
