[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to navigate to next git conflict?
From: |
Hi-Angel |
Subject: |
Re: How to navigate to next git conflict? |
Date: |
Wed, 6 Feb 2019 14:37:06 +0300 |
Thanks!
So, for now I wrote the following function, hope this helps someone
(defun smerge-next-safe ()
"returns t on success, nil otherwise"
(condition-case err
(not (smerge-next))
('error
nil)))
(defun next-conflict ()
(interactive)
(let ((buffer (current-buffer)))
(when (not (smerge-next-safe))
(vc-find-conflicted-file)
(if (eq buffer (current-buffer))
(message "No conflicts found"))
(smerge-next-safe)))
)
I guess I'll try to contribute a similar functional to Emacs on the weekend.
On Tue, 29 Jan 2019 at 12:43, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > For working with git I noted one of frequent actions I do is resolving
> > conflicts. I'm comfortable to work with most of that from terminal
> > (I've got a completion in zsh and what not…) except that conflict
> > navigation could use a bit of automation.
> >
> > So far I only managed to find `smerge-next`, but it is limited to the
> > focused buffer, in there I can as well search for a HEAD or <<<
> > markers, so not really useful.
>
> There's also `vc-find-conflicted-file` to go to the next file with
> conflicts when you're done with one.
>
>
> Stefan
>
>
- Re: How to navigate to next git conflict?,
Hi-Angel <=