-
Notifications
You must be signed in to change notification settings - Fork 377
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
🐛 git add -p one-to-one correspondence errors #320
Comments
Hi @Minnozz, thanks for this, very helpful. Clearly the test suite needs to be strengthened for |
Hi @dandavison, let me know if you need more information. |
I looked for causes of this bug before, and
these options made it happened. |
I'd like to note that For reference, my delta --show-config. EDIT Oddly enough this config doesn't break |
Thank you @Kr1ss-XD for looking. Hmm, I tried same config with you, however, it doesn't work. (core.pager = delta, and interactive.diffFilter = delta --color-only) As picture showing,
Additionally, with your config, if I delete
now it works. |
That's weird. I'm trying @Minnozz 's configuration as I'm writing. It seems if the FWIW,
I hope this helps chasing that bug. |
I think I found something :If I put the
cc @dandavison EDIT The same applies to |
@Kr1ss-XD I think
this is the reason why side-by-side works. I look for file-style, hunk-header-style's reasons. |
Thanks a lot @Kr1ss-XD and @Ryuta69 for investigating here. I think @Kr1ss-XD's suggestion of using features to work around these issues is an excellent one for now, until we fix all the @Kr1ss-XD I'm finding that I have to move both the So, to be completely explicit, here is a modification of @Minnozz's config that I am finding works. [delta]
features = meta
commit-style = raw
# file-style = blue
# hunk-header-style = syntax
minus-style = syntax 52
minus-emph-style = syntax 88
zero-style = syntax normal
plus-style = syntax black
plus-emph-style = syntax 22
keep-plus-minus-markers = true
line-numbers = true
line-numbers-minus-style = red
line-numbers-zero-style = brightgreen
line-numbers-plus-style = green
whitespace-error-style = reverse magenta
minus-empty-line-marker-style = normal 88
plus-empty-line-marker-style = normal 22
[delta "meta"]
file-style = blue
hunk-header-style = syntax
[delta "diff-filter"]
# Can leave empty, but optionally put diffFilter-only settings here
[interactive]
# I've added a --features override here to be explicit that we don't want diffFilter to use the
# features defined in the main [delta] section.
diffFilter = delta --color-only --features=diff-filter |
@Ryuta69 It would be awesome if you can make progress here! I'm not certain but I think |
[WIP]
also triggers this bug. (It's because it removes commit hash.) I build test, then I realized only It's still WIP, but gonna send PR in few days. |
[core]
pager = delta
[delta]
file-decoration-style = ul
[interactive]
diffFilter = delta --color-only also produce this issue. |
@kevinhwang91 could you confirm your delta version please? |
delta --version |
Sorry, I missed it. |
Remaining bugs here should be fixed in master thanks to @ulwlu's PR #367. I'll post when it's released. |
I'm having the same issue on Linux and v0.7.1, and confirmed that the suggested features workaround works. FWIW here's my config: $ delta --version
delta 0.7.1
$ delta --show-config
commit-style = raw
file-style = bold normal
hunk-header-style = normal
minus-style = syntax "#340001"
minus-non-emph-style = syntax "#340001"
minus-emph-style = normal "#901011"
minus-empty-line-marker-style = normal "#3f0001"
zero-style = syntax
plus-style = syntax "#033500"
plus-non-emph-style = syntax "#033500"
plus-emph-style = syntax "#006000"
plus-empty-line-marker-style = normal "#002800"
whitespace-error-style = reverse red
24-bit-color = true
file-added-label = 'added:'
file-modified-label = Δ
file-removed-label = 'removed:'
file-renamed-label = 'renamed:'
hyperlinks = false
inspect-raw-lines = true
keep-plus-minus-markers = false
line-numbers = true
line-numbers-minus-style = 88
line-numbers-zero-style = "#444444"
line-numbers-plus-style = 28
line-numbers-left-style = blue
line-numbers-right-style = blue
line-numbers-left-format = '{nm:^4}⋮'
line-numbers-right-format = '{np:^4}│'
max-line-distance = 0.6
max-line-length = 512
navigate = true
navigate-regexp = ^(commit|Δ|added:|removed:|renamed:)
paging = auto
side-by-side = false
syntax-theme = Monokai Extended
width = 190
tabs = 4
word-diff-regex = '\w+' And the relevant parts of
|
Seems like diff-so-fancy has managed to add support |
@lithammer Yes, and that is what Delta does, since [interactive]
diffFilter = delta --color-only @imiric Thanks, I can reproduce your bug -- using |
I know about |
Wanted to chime in here saying that, this seems to work for my git repositories, but for a git repository with sub-modules, |
Thanks @hahuang65 that's a regression in v0.9.0. Let's discuss in #755. I'm aiming to release a fix for it shortly. |
I was using an old version of delta (0.8.2) and today upgraded to 0.15.1. I've been able to use |
@joefiorini asked if there could be a regression causing this to still be an issue. I note this issue wasn't closed when #756 was merged in. Was there some other cause for mismatched input that #756 didn't fix? Or is it indeed a regression? |
Hi all, is anyone aware of unsolved problems here? (I'm not, but I use magit rather than |
Yes, I have experienced problems with this recently (my delta config is here, if that helps) |
I can confirm this regressed "recently", I've bisected it down to e0eef7d It took me a while to understand why this only happened very rarely, but looking at the commit itself it's obvious in hindsight -- that only happens when I modified some binary files in the repo...! With that in hand, this can be reproduced as follow:
I'm sure there are better ways of getting
lunchbreak ended so I'll leave the rest to whoever cares, I've downgraded for now :) |
Nice find. There's also a way to dump encoded binary hunks to the diff output with |
@imbrish just in case you want to continue your great work in this area, this bug seems like it might be in your area of expertise? But no worries at all if you don't have time! |
Thanks very much, @dandavison! 🥳 |
Np but actually, it's @imbrish we have to thank for the progress here! |
When I try to use
git add -p
, I get the following error:I'm using
delta
with the following config:In my .gitconfig are the following relevant options:
The text was updated successfully, but these errors were encountered: