[Top][All Lists]

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

Re: git is screwed

From: Stefan Monnier
Subject: Re: git is screwed
Date: Fri, 27 Mar 2015 09:09:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> > It's a minor mode, so of course it's configurable: just switch it off.
>> The "git add" part is independent from smerge-mode (tho they're linked
>> by the fact that they both depend on the VC backend being able to
>> recognize that a file has conflicts).  So turning smerge-mode off won't help.
> It wasn't clear from the question what needs to be configurable.
> There was another advice, which you elided, that would disable "git
> add" as well.

IIUC removing vc-find-file-hook from find-file-hook would have other
effects beside avoiding the "git add" (IIRC the main one would be to
not auto-enable smerge-mode).

To only skip the "git add", you'd need to

    (remove-hook 'after-save-hook 'vc-git-resolve-when-done 'local)

but this needs to be done after the corresponding `add-hook'.  I haven't
checked, but the following might/should work:

    (add-hook 'find-file-hook
              (lambda ()
                (remove-hook 'after-save-hook 'vc-git-resolve-when-done 'local))
              ;; Put it after VC's vc-find-file-hook.

-- Stefan

reply via email to

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