dud
dud copied to clipboard
Don't mess with yaml formatting while checksumming
Is your feature request related to a problem? Please describe.
If I add comments or nicely format my command for readability, it is lost upon dud commit
Describe the solution you'd like
Maintain the formatting through dud commit
I agree that this is annoying. Unfortunately solving it is non-trivial. Best case scenario, I upgrade to yaml.v3 which allegedly supports this, albeit with a big caveat:
It's worth noting that although Node offers access into details such as line numbers, colums (sp), and comments, the content when re-encoded will not have its original textual representation preserved. An effort is made to render the data plesantly (sp), and to preserve comments near the data they describe, though.
Worst case scenario, I roll my own "checksum injector", which I don't think would be worth the burden.
I think trying yaml.v3 makes sense as a next step. Thanks for opening the issue!
For now I am closing this as unplanned for the reasons I lay out above. I am not ruling it out entirely, though! If someone thinks there's a sensible way to do this, please let me know in this thread.