-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 weird? handling of git colorMoved #1098
Comments
Hi @martinetd, sorry you lost time on this. As you see, |
Thanks for the reply, it's appreciated! :) I'm not sure either -- I think the colorMoved feature in itself can be quite powerful, but the default color scheme made me at first misunderstand the diff (I thought only the green/red-background lines were added/removed as usual), then when that didn't make sense I assumed something was broken But given the examples are rather big I'm not sure it's really friendly, so just removing Conceptually it's a bit weird that delta can ignore the original colors and remap with themes, yet keep the git config for colorMoved, but I don't think there's much choice here unless we can come up with a more robust way of parsing that... And I certainly don't have any idea for that. |
I just got the same misunderstanding when looking at a diff. I believe that having by default the same background color than for non-moved lines would go a long way already. |
Hey, my issue is to do with this one it seems. Basically I have delta set up, default configuration (from https://dandavison.github.io/delta/configuration.html):
I've "removed" (renamed and moved some bits) a file: However, technically I've moved two of the things (output and variable) to their respective files and renamed I do feel @dandavison that it'd be good to remove that from the main example config, as I had no idea I'd done that by configuring this like that as I didn't even know what that feature did until now.
|
Hi @ElvenSpellmaker, thanks, yes I agree. Removed in #1884 |
Thanks! |
Shouldn't this bug be kept open? |
There is no bug? The only issue is if you set the mode to default then that's what git diff displays. If you don't like the output then you'd need to get git to change the zebra mode. |
The main issue for me (see my previous comment) is that the background color is different between moved and non-moved lines. I think zebra should change the background color by default. I don't know if that's an easy thing to do or appropriate, but at the moment the default is confusing in my opinion. |
That seems like a separate issue as all delta does is show the same diff the normal programme gives back. What you want in your case is extra functionality thaybthebnkemal zebra mode doesn't support. |
Hello,
thanks for delta!
(running on master's top, e7dbdd4)
I just noticed weird coloration on a commit.
After investigating it is due to git's diff.colorMoved = default, left without it and right with it:
I glanced through #72 but there are no open issues about colorMoved so preferred to open a new one; now I've read about it quite a bit I can say it's not a bug: manual/src/color-moved-support.md clearly states delta passes git colors unchanged.
Remarks after output.
I'm sure there are plenty of example, but I noticed it on linux's a6809941c1f17f455db2cf4ca19c6d8c8746ec25 ; here's part of the output (to use with
sed -e 's/\\33/\x1b/g'
or something similar):So:
I'm not quite sure what to suggest here; now I understand this better I might try fiddling with themes a bit as described in #72 but that feels like quite an advanced featureand probably just shouldn't be promoted in the README without making manual/src/color-moved-support.md prominent, or making it more integrated with themes, or at least the default ones?
I realize it's not possible to make everyone happy and ultimately don't really care, just wanted to say this was 1/ surprising and 2/ made me waste quite a bit of time so I'm wasting more by venting :P
Thanks anyway :)
The text was updated successfully, but these errors were encountered: