From: Gesh Date: Thu, 23 Oct 2025 23:29:47 GMT Subject: Handling of improperly-configured custom diff drivers is confusing Message-ID: Hi, After investigating what I thought was a git bug, I ultimately found it was due to my misconfiguring the diff.pdf driver. In particular, I had (years ago now) misread either the git docs or the pdftotext manual, because I had naively configured diff.pdf.textconv = pdftotext Unfortunately, pdftotext's default behaviour is to write the text to a new file, not stdout -- the correct configuration is diff.pdf.textconv = sh -c 'pdftotext "$0" -' All this is well and good, and thankfully this episode has left me with a better configuration. Although, it would perhaps be nice to have git warn on a textconv configuration that was constantly emitting an empty file for existent files. Moreover, my investigation yielded some surprising (and underdocumented?) information: - It appears that triggering a textconv driver with cachetextconv set generates a commit. I caught this because I configure the user information per-repo, so diff was complaining the user wasn't configured - Custom diff drivers are run in a temp directory subsequently rmdir'd by git. In particular, they _can_ write to disk, but must cleanup after themselves. Caught this because my configuration *was* leaving files around -- but git only complained it couldn't rmdir. - git diff and git log crash if in the course of printing a custom diff driver crashes. In particular, they cut off printing. This was useful, because it meant I actually bumped into this bug, instead of it slipping my notice as I jumped in the output to the tag I was interested in. - git log --simplify-by-decoration seems to generate some sort of squash commit of all the commits between two nodes it prints, but display them under the existing SHA. I think this was the first time I used simplify-by-decoration this thoroughly, so I hadn't noticed this before. Not sure how much of this is actionable -- it ultimately ended up being my fault, but I'd've appreciated clearer diagnostic messages and clarifications in the docs. Either way, hope this is useful to someone. Gesh