GNU bug report logs - #79050
vc-git incorrectly treats git-crypt encrypted files as binary, even when unlocked

Previous Next

Package: emacs;

Reported by: James Cherti <contact <at> jamescherti.com>

Date: Sat, 19 Jul 2025 18:01:02 UTC

Severity: normal

Tags: notabug

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 79050 <at> debbugs.gnu.org, James Cherti <contact <at> jamescherti.com>
Subject: bug#79050: vc-git incorrectly treats git-crypt encrypted files as binary, even when unlocked
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.




This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.