emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add smerge-mode, conflicted-files support to vc-git.


From: Rüdiger Sonderfeld
Subject: Re: [PATCH] Add smerge-mode, conflicted-files support to vc-git.
Date: Mon, 13 Jan 2014 13:31:21 +0100
User-agent: KMail/4.11.3 (Linux/3.11.0-14-generic; KDE/4.11.3; x86_64; ; )

On Saturday 11 January 2014 21:52:23 Stefan Monnier wrote:
> This is the main problem, of course.  It means running git twice per
> file rather than once.  We could probably improve this by only calling
> vc-git-conflicted-files if the file is under Git's control and only if
> it's locally modified.  If you can think of some other check we could do
> to call the file even less frequently, that'd be even better.
>
> Also, I think the check shouldn't be in find-file-hook but in
> vc-git-state (so as to return `conflicted' state).

Yes, `vc-git-state' should indicate conflicts.  Right now it calls `git diff-
index' and treats U as edit instead of `conflicted'.  I'm not very familiar 
with the details of `vc-git' and therefore am not sure if we can simply change 
it.

The hg implementation lacks a `conflicted' state as well and simply checks if 
the file is edited and looks for the merge markers.  Maybe that would be 
enough for git as well.

> I haven't looked in detail at the patch but did notice also that
> vc-git-conflicted-files is documented to take a `directory' as argument
> whereas here you call it with a file name.

Yes, `vc-conflicted-files' is documented to take a `directory'.  But `vc-git-
conflicted-files' should work with a `file name' argument.  I guess this 
should be documented.

Regards,
Rüdiger




reply via email to

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