Subject: bug#79050: vc-git incorrectly treats git-crypt encrypted files as binary, even when unlocked

From: Juri Linkov <[email-masked]>
Date: Tue, 22 Jul 2025 09:45:09 +0300

> Is this enough to fix it?
>
> @@ -1829,7 +1829,7 @@ vc-git-diff
>                 (if async 'async 1)
>                 files
>                 command
> -               "--exit-code"
> +               "--exit-code" "--textconv"

Thanks for adding "--textconv".  Before this change I used

  (with-eval-after-load 'vc-git
    (add-to-list 'vc-git-diff-switches "--textconv" t))

that worked on `git diff` but failed on `git diff-index` with

  (error "Failed (status 128): git diff-index --textconv -p 1234567890  -- .")

But maybe this was in an old git version since it's not reproducible now.

Also I remember a minor inconvenience that "--textconv" makes `git diff`
too slow on encrypted files.  Most of the time there is no need
to see decrypted text in diff output.  So I prefered to add "--textconv"
only occasionally: mostly to verify the encrypted content before committing
changes, but not when viewing logs with diff.

Would it be possible to enable this optionally?
Maybe a simple variable would suffice.