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: Sean Whitton <spwhitton <at> spwhitton.name>
To: James Cherti <contact <at> jamescherti.com>
Cc: 79050 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#79050: vc-git incorrectly treats git-crypt encrypted files as binary, even when unlocked
Date: Tue, 22 Jul 2025 20:37:25 +0100
Hello,

On Tue 22 Jul 2025 at 09:27am -04, James Cherti wrote:

>> Another problem is that you can't commit changes from *vc-diff* buffers
>> with --textconv, and if you try to do so anyway, it might break things
>> in your repository, without you realising.
>
> Out of curiosity, how can I reproduce the issue that occurs
> when committing from a vc-diff buffer with --textconv?

I believe that if you try to use C-x v v in a diff buffer that's
textconv'd, it'll try to apply the plain text diff to the binary file.

>> Therefore I think that users should have to add this to
>> vc-git-diff-switches themselves if they want this.  I'll revert the
>> change.
>
> If the change is simply reverted, some users may not
> discover that their issue can be addressed by using the
> --textconv option.
>
> Providing this behavior as an optional, user-configurable
> variable would make its existence visible through the
> docstring. This could help reduce confusion and the time
> users spend investigating why vc-diff appears broken or
> why tools like diff-hl fail to work correctly in
> repositories that use git-crypt:
> https://github.com/dgutov/diff-hl/issues/244#issuecomment-3102297241

The thing is, you could make an argument like this for all the other
optional arguments that git-diff{,-index} have.  One point of having
vc-git-diff-switches is to avoid having a separate Emacs option for each
individual optional argument.

-- 
Sean Whitton




This bug report was last modified 10 days ago.

Previous Next


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