* diff/merge tool that ignores whitespace changes
[not found] <c58cfa61-84c0-4bbe-80a6-59f156317007@zcs>
@ 2012-08-28 16:26 ` Enrico Weigelt
2012-08-28 17:40 ` Stephen Bash
0 siblings, 1 reply; 9+ messages in thread
From: Enrico Weigelt @ 2012-08-28 16:26 UTC (permalink / raw)
To: git
Hi folks,
I'm looking for a diff / merge tool that treats lines with
only whitespace changes (trailing or leading whitespaces,
linefeeds, etc) as equal.
The goal is to make reviews as well as merging or rebasing
easier when things like indentions often change.
Does anybody know an solution for that ?
thx
--
Mit freundlichen Grüßen / Kind regards
Enrico Weigelt
VNC - Virtual Network Consult GmbH
Head Of Development
Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-08-28 16:26 ` diff/merge tool that ignores whitespace changes Enrico Weigelt
@ 2012-08-28 17:40 ` Stephen Bash
2012-08-28 17:41 ` Matthew Caron
2012-09-01 20:11 ` Enrico Weigelt
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Bash @ 2012-08-28 17:40 UTC (permalink / raw)
To: Enrico Weigelt; +Cc: git
----- Original Message -----
> From: "Enrico Weigelt" <enrico.weigelt@vnc.biz>
> Sent: Tuesday, August 28, 2012 12:26:39 PM
> Subject: diff/merge tool that ignores whitespace changes
>
> I'm looking for a diff / merge tool that treats lines with
> only whitespace changes (trailing or leading whitespaces,
> linefeeds, etc) as equal.
>
> The goal is to make reviews as well as merging or rebasing
> easier when things like indentions often change.
>
> Does anybody know an solution for that ?
I use kdiff3 which has the option to ignore whitespace changes (bonus: I can use it on all three major OSes as my work requires). It's GUI based, so that could be considered a downside to some.
I usually use a combination of Git's built-in diff and kdiff to check my work.
HTH,
Stephen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-08-28 17:40 ` Stephen Bash
@ 2012-08-28 17:41 ` Matthew Caron
2012-08-28 18:08 ` Stephen Bash
2012-09-01 20:11 ` Enrico Weigelt
1 sibling, 1 reply; 9+ messages in thread
From: Matthew Caron @ 2012-08-28 17:41 UTC (permalink / raw)
To: Stephen Bash; +Cc: Enrico Weigelt, git
On 08/28/2012 01:40 PM, Stephen Bash wrote:
> ----- Original Message -----
>> From: "Enrico Weigelt" <enrico.weigelt@vnc.biz>
>> Sent: Tuesday, August 28, 2012 12:26:39 PM
>> Subject: diff/merge tool that ignores whitespace changes
>>
>> I'm looking for a diff / merge tool that treats lines with
>> only whitespace changes (trailing or leading whitespaces,
>> linefeeds, etc) as equal.
>>
>> The goal is to make reviews as well as merging or rebasing
>> easier when things like indentions often change.
>>
>> Does anybody know an solution for that ?
I'm fond of Meld.
--
Matthew Caron, Software Build Engineer
Sixnet, a Red Lion business | www.sixnet.com
+1 (518) 877-5173 x138 office
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-08-28 17:41 ` Matthew Caron
@ 2012-08-28 18:08 ` Stephen Bash
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Bash @ 2012-08-28 18:08 UTC (permalink / raw)
To: Matthew Caron; +Cc: Enrico Weigelt, git
----- Original Message -----
> From: "Matthew Caron" <Matt.Caron@redlion.net>
> Sent: Tuesday, August 28, 2012 1:41:51 PM
> Subject: Re: diff/merge tool that ignores whitespace changes
>
> > > I'm looking for a diff / merge tool that treats lines with only
> > > whitespace changes (trailing or leading whitespaces, linefeeds,
> > > etc) as equal.
> > >
> > > The goal is to make reviews as well as merging or rebasing easier
> > > when things like indentions often change.
> > >
> > > Does anybody know an solution for that ?
>
> I'm fond of Meld.
I loved Meld when I was working exclusively on Linux several years ago. Honestly I think I set up my kdiff fonts/highlight colors/etc. to be very Meld-like (unintentionally, just what "looked right"). Looking at the website, technically Meld should build/run on a variety of OSes, but at some point (lost to the sands of time) I ran into trouble which is why I switched.
Stephen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-08-28 17:40 ` Stephen Bash
2012-08-28 17:41 ` Matthew Caron
@ 2012-09-01 20:11 ` Enrico Weigelt
2012-09-01 20:41 ` Torsten Bögershausen
2012-09-01 21:09 ` Andreas Schwab
1 sibling, 2 replies; 9+ messages in thread
From: Enrico Weigelt @ 2012-09-01 20:11 UTC (permalink / raw)
To: git
<snip>
Thanks folks, but that doesn't solve my problem. I'm looking for something
that's usable on command line or in scripts.
Usecase a)
* git-diff or git-format-patch or tig should not show differences
that are only whitespace changes (eg. differing linefeeds or
tabs vs. spaces, changed indentions, etc)
Usecase b)
* when doing merges or rebases, changes in whitespaces only should be
either ignored or resolved fully automtically.
* For example:
-> A changes spaces into tabs or adds leading/trailing spaces
-> B changes some non-spaces
cu
--
Mit freundlichen Grüßen / Kind regards
Enrico Weigelt
VNC - Virtual Network Consult GmbH
Head Of Development
Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-09-01 20:11 ` Enrico Weigelt
@ 2012-09-01 20:41 ` Torsten Bögershausen
2012-09-02 21:07 ` Enrico Weigelt
2012-09-01 21:09 ` Andreas Schwab
1 sibling, 1 reply; 9+ messages in thread
From: Torsten Bögershausen @ 2012-09-01 20:41 UTC (permalink / raw)
To: Enrico Weigelt; +Cc: git
On 01.09.12 22:11, Enrico Weigelt wrote:
>
> <snip>
>
> Thanks folks, but that doesn't solve my problem. I'm looking for something
> that's usable on command line or in scripts.
>
> Usecase a)
>
> * git-diff or git-format-patch or tig should not show differences
> that are only whitespace changes (eg. differing linefeeds or
> tabs vs. spaces, changed indentions, etc)
Would that help ?
git help diff
[snip]
--ignore-space-at-eol
Ignore changes in whitespace at EOL.
-b, --ignore-space-change
Ignore changes in amount of whitespace. This ignores whitespace at
line end, and considers all other sequences of one or more
whitespace characters to be equivalent.
-w, --ignore-all-space
Ignore whitespace when comparing lines. This ignores differences
even if one line has whitespace where the other line has none.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-09-01 20:41 ` Torsten Bögershausen
@ 2012-09-02 21:07 ` Enrico Weigelt
2012-09-03 20:40 ` Jonas Fonseca
0 siblings, 1 reply; 9+ messages in thread
From: Enrico Weigelt @ 2012-09-02 21:07 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: git
Hi,
> Would that help ?
> git help diff
> [snip]
> --ignore-space-at-eol
> Ignore changes in whitespace at EOL.
>
> -b, --ignore-space-change
> Ignore changes in amount of whitespace. This ignores
> whitespace at
> line end, and considers all other sequences of one or more
> whitespace characters to be equivalent.
>
> -w, --ignore-all-space
> Ignore whitespace when comparing lines. This ignores
> differences
> even if one line has whitespace where the other line has
> none.
That might be it :)
Now I yet need to find out how to configure tig for it.
By the way: anything similar for merge/rebase ?
thx
--
Mit freundlichen Grüßen / Kind regards
Enrico Weigelt
VNC - Virtual Network Consult GmbH
Head Of Development
Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-09-02 21:07 ` Enrico Weigelt
@ 2012-09-03 20:40 ` Jonas Fonseca
0 siblings, 0 replies; 9+ messages in thread
From: Jonas Fonseca @ 2012-09-03 20:40 UTC (permalink / raw)
To: Enrico Weigelt; +Cc: Torsten Bögershausen, git
On Sun, Sep 2, 2012 at 5:07 PM, Enrico Weigelt <enrico.weigelt@vnc.biz> wrote:
> Hi,
>
>> Would that help ?
>> git help diff
>> [snip]
>> --ignore-space-at-eol
>> Ignore changes in whitespace at EOL.
>>
>> -b, --ignore-space-change
>> Ignore changes in amount of whitespace. This ignores
>> whitespace at
>> line end, and considers all other sequences of one or more
>> whitespace characters to be equivalent.
>>
>> -w, --ignore-all-space
>> Ignore whitespace when comparing lines. This ignores
>> differences
>> even if one line has whitespace where the other line has
>> none.
>
> Now I yet need to find out how to configure tig for it.
Try: echo "set ignore-space = all" >> ~/.tigrc
And use 'W' to toggle between the different modes.
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: diff/merge tool that ignores whitespace changes
2012-09-01 20:11 ` Enrico Weigelt
2012-09-01 20:41 ` Torsten Bögershausen
@ 2012-09-01 21:09 ` Andreas Schwab
1 sibling, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2012-09-01 21:09 UTC (permalink / raw)
To: Enrico Weigelt; +Cc: git
Enrico Weigelt <enrico.weigelt@vnc.biz> writes:
> * git-diff or git-format-patch or tig should not show differences
> that are only whitespace changes (eg. differing linefeeds or
> tabs vs. spaces, changed indentions, etc)
--ignore-all-space
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-03 20:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <c58cfa61-84c0-4bbe-80a6-59f156317007@zcs>
2012-08-28 16:26 ` diff/merge tool that ignores whitespace changes Enrico Weigelt
2012-08-28 17:40 ` Stephen Bash
2012-08-28 17:41 ` Matthew Caron
2012-08-28 18:08 ` Stephen Bash
2012-09-01 20:11 ` Enrico Weigelt
2012-09-01 20:41 ` Torsten Bögershausen
2012-09-02 21:07 ` Enrico Weigelt
2012-09-03 20:40 ` Jonas Fonseca
2012-09-01 21:09 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).