bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39452: [PATCH] vc-git-state fails for filenames with wildcards


From: Noam Postavsky
Subject: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards
Date: Wed, 12 Feb 2020 10:24:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt)

Dmitry Gutov <address@hidden> writes:

> On 07.02.2020 16:43, Noam Postavsky wrote:
>> Dmitry Gutov <address@hidden> writes:
>>
>>> It's not so simple. FILE already goes through call-process. But Git
>>> expects a pathspec, not just a file name. So if it's a glob, it is
>>> expanded.
>>
>> You can pass --literal-pathspecs to tell git not to expand.  Magit does
>> this.  But there is a downside due to the way git implements it, which
>> is by setting an environment variable: it affects all subprocesses git
>> calls, including git-hook scripts which tends to trip people up.
>
> I wonder how bad the latter problem is.  After all, even if it
> happens, it *can* be worked around in the same scripts.

Yes, it's common enough to have a FAQ for it.
https://magit.vc/manual/magit/My-Git-hooks-work-on-the-command_002dline-but-not-inside-Magit.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]