emacs-devel
[Top][All Lists]
Advanced

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

Re: Git conflict VC state detection


From: Stefan Monnier
Subject: Re: Git conflict VC state detection
Date: Sun, 10 Nov 2013 21:13:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> So, an alternative to fixing vc-state is to add a vc-git-conflict-p called
>> from the find-file-hook.
> IIUC what you propose does not reduce the number of git invocations
> while visiting/reverting a file

Indeed :-(

It can reduce it in a few other cases where vc-state is called without
visiting/reverting a file.  Admittedly, these are rare (mostly because
vc-dir doesn't use vc-state but some other function).

Maybe another option is to do:
if status is ambiguous and could be `conflict', look for diff3 markers,
and if found, run git a second time to confirm that the status is
`conflict'.  Of course, if we could get the `conflict' status in
a single git invocation that would be much better.


        Stefan



reply via email to

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