Closed xudyang1 closed 3 days ago
Thank you for the report!
Setting my terminal to a width of 137 (see echo $COLUMNS
, so it wraps after filetype prβ΅
, also setting β΅
to the empty string), and running
cat crash_diff | HOME=/ delta --no-gitconfig --side-by-side --wrap-left-symbol=' '
doesn't reproduce it here. Using delta 0.18.1 on Linux. Can you try that command, and add other flags from your gitconfig if needed?
I have a panic that looks like the same problem using latest delta:
thread 'main' panicked at /home/demarteaub/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-delta-0.18.1/src/paint.rs:957:17:
String mismatch encountered while superimposing style sections: ':' vs 'β΅'
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
With 92 columns and the following git config:
[pager]
diff = delta
[delta]
side-by-side = true
inspect-raw-lines = true
features = navigate
hunk-header-style = file line-number syntax
Part of the diff to reproduce:
diff --git a/ansible/ansible_collections/vdl/devops/plugins/lookup/password.py b/ansible/ansible_collections/vdl/devops/plugins/lookup/password.py
index 358f9328..5a8a1dc2 100644
--- a/ansible/ansible_collections/vdl/devops/plugins/lookup/password.py
+++ b/ansible/ansible_collections/vdl/devops/plugins/lookup/password.py
@@ -83,6 +83,7 @@ class Secret(typing.TypedDict):
class LookupModule(LookupBase):
+
def run(self, terms, variables: HostVars, **kwargs) -> typing.List[Secret]:
# First of all populate options,
# this will already take into account env vars and ini config
@@ -126,6 +127,8 @@ class LookupModule(LookupBase):
force_renew = variables.get("vdl.devops.password.force_renew")
secret = None
skip_existing = False
+ # 0 means vault must reject the secret create if a secret already exists
+ current_version = 0
if force_renew == "*all" or force_renew == secret_path:
display.display(f"forcing renew of {secret_path}", color="purple")
The delta output:
$ < test.diff delta
thread 'main' panicked at /home/demarteaub/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-delta-0.18.1/src/paint.rs:957:17:
String mismatch encountered while superimposing style sections: ':' vs 'β΅'
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Ξ ansible/ansible_collections/vdl/devops/plugins/lookup/password.py
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β’ ansible/ansible_collections/vdl/devops/plugins/lookup/password.py:83: class Secret(typing.TypedDict): β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 83 β β 83 β
β 84 β β 84 β
β 85 βclass LookupModule(LookupBase): β 85 βclass LookupModule(LookupBase):
Thank you for the report!
Setting my terminal to a width of 137 (see
echo $COLUMNS
, so it wraps afterfiletype prβ΅
, also settingβ΅
to the empty string), and runningcat crash_diff | HOME=/ delta --no-gitconfig --side-by-side --wrap-left-symbol=' '
doesn't reproduce it here. Using delta 0.18.1 on Linux. Can you try that command, and add other flags from your gitconfig if needed?
I am using windows terminal with WSL2 (Ubuntu 22.04) in full screen mode. The maximum $COLUMNS
is 136:
Even when I set export COLUMNS=137
, the diff still reports error.
Does delta only work for columns greater than 136? @th1000s
By running cargo install git-delta --locked
, the issue is fixed with delta 0.18.2.