Comments (7)
That's how it is designed. For unified diff we need the leading chars to
distinguish lines from original and new files, while for side by side diff
we do not need them, by nature left side is original and right side is new.
On Friday, April 24, 2015, Mathieu Arnold [email protected] wrote:
Hi,
I'm a FreeBSD port committer, and in that capacity, I patch software a lot
to coerce it to work on FreeBSD, or with newer version of software that
upstream does not support yet, and in that capacity, we deal with a lot of
patches, that change over time, and there's a bug in the side by side
thingie.To get the diff I'm talking about, you can run svn diff -c 384636
https://svn0.eu.freebsd.org/ports
/head/devel/p5-Data-Alias/files/patch-Alias.xsThe unified version of cdiff looks quite all right:
[image: capture d ecran 2015-04-24 a 15 08 21]
https://cloud.githubusercontent.com/assets/75783/7319189/de571cb2-ea93-11e4-9ebc-539fcebddf19.pngBut the side by side eats all the + at the beginning of the lines, and
does not look that good:[image: capture d ecran 2015-04-24 a 15 08 38]
https://cloud.githubusercontent.com/assets/75783/7319198/fe78b4f6-ea93-11e4-85ea-69b677baaae9.png—
Reply to this email directly or view it on GitHub
#44.
from ydiff.
If you look at the screenshots, you'll see it eats all the + at the start of the line, not just the first one.
from ydiff.
The source is a patch file so the output looks confusing, but cdiff indeed only "eat" the first -
or +
.
from ydiff.
I'm sorry, but no, it ate two.
line 147, it starts with <space>+#ifdef...
shows up as +#ifdef...
line 148, starts with ++#if (PERL...
shows up as #if (PERL...
it's eating both +, which is bad.
from ydiff.
Note, it's eating in the side by side version, the unified diff version is fine.
from ydiff.
I got what you are saying, indeed it's a bug. Probably wrong use of lstrip
. I will fix it soon, thanks for reporting!
from ydiff.
Fixed in commit 10fa1e8, new version 0.9.7 available on pypi.
from ydiff.
Related Issues (20)
- How to use ydiff in "git add -p"? HOT 2
- Request: expose basic diff command as a callable HOT 4
- Unable to diff two local files? HOT 2
- Highlight just changed characters, not lines.
- Apt package? HOT 2
- side-by-side becomes unified when disabling color HOT 7
- Using "git difftool --extcmd="ydiff" displayes temporary file names HOT 3
- Hang on large files HOT 5
- Replace legacy distutils by... setuptools? HOT 7
- Implement option to ignore deleted files HOT 7
- " brew install ydiff " doesnt work HOT 2
- Fedora package HOT 6
- Customize colors HOT 3
- Configurable pager behaviour (auto/always/never) HOT 13
- Heads-up: FreeBSD package
- configure default to side by side HOT 4
- Stdin only works if in a VCS HOT 1
- Tabs are not expanded correctly in `-s` mode
- How to use on Windows HOT 4
- Highlight changes instead of underlining them HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ydiff.