Replies: 3 comments 2 replies
-
Hi @lf-
Can you post example input that makes delta behave incorrectly? |
Beta Was this translation helpful? Give feedback.
-
Hm, these both work for me
But json-diff doesn't seem to produce unified diff format, so delta will not display it as a diff. (I wasn't sure of the significance of this part of your instructions:
) |
Beta Was this translation helpful? Give feedback.
-
What's your OS and |
Beta Was this translation helpful? Give feedback.
-
Hi! I've tried setting up delta (0.17.0) to use json-diff (from npm) for json files, since it has a nice structural diff. However, this seems to cause the pager to break: I have to hit enter for any pager input to work. Is there some way to get this to work properly?
I seem to have reduced it to being that the delta pager explodes if one gives it json-diff output, which is kind of strange.
Relevant bits of git config:
https://asciinema.org/a/sCiRIhE1ZcD94V8mHFxLfmeVM
Easiest repro, probably:
test2.json:
{"meow": true, "sotrue": true,"key0": true,"key1": true,"key2": true,"key3": true,"key4": true,"key5": true,"key6": true,"key7": true,"key8": true,"key9": true,"key10": true,"key11": true,"key12": true,"key13": true,"key14": true,"key15": true,"key16": true,"key17": true,"key18": true,"key19": true,"key20": true,"key21": true,"key22": true,"key23": true,"key24": true,"key25": true,"key26": true,"key27": true,"key28": true,"key29": true,"key30": true,"key31": true,"key32": true,"key33": true,"key34": true,"key35": true,"key36": true,"key37": true,"key38": true,"key39": true,"key40": true,"key41": true,"key42": true,"key43": true,"key44": true,"key45": true,"key46": true,"key47": true,"key48": true,"key49": true,"key50": true,"key51": true,"key52": true,"key53": true,"key54": true,"key55": true,"key56": true,"key57": true,"key58": true,"key59": true,"key60": true,"key61": true,"key62": true,"key63": true,"key64": true,"key65": true,"key66": true,"key67": true,"key68": true,"key69": true,"key70": true,"key71": true,"key72": true,"key73": true,"key74": true,"key75": true,"key76": true,"key77": true,"key78": true,"key79": true,"key80": true,"key81": true,"key82": true,"key83": true,"key84": true,"key85": true,"key86": true,"key87": true,"key88": true,"key89": true,"key90": true,"key91": true,"key92": true,"key93": true,"key94": true,"key95": true,"key96": true,"key97": true,"key98": true,"key99": true}
test.json:
{"meow": true}
then:
json-diff test2.json test.json | delta
I will note that it seems that
json-diff
is load bearing in this misbehaviour: I can pipe it from cat of a file containing the exact output of the program and it will work properly. I wonder if it is somehow IO buffering?! I tried usingsponge
in the pipeline and that didn't change anything, which surprises me since I would expect sponge to fix this.Beta Was this translation helpful? Give feedback.
All reactions