diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2018-09-28 13:53:13 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2018-09-28 13:53:13 +0200 |
| commit | 7c74b660909bac25c3fc838857b878b660da246c (patch) | |
| tree | a46528326c1bbccc9ce67c835a6c7c4e5e80b967 /lisp/magit-bisect.el | |
| parent | ca76db7746fed7b5e75911e6dd387c6d8d7bdd05 (diff) | |
magit-bisect-start: Error out when there are uncommitted changes
Strictly speaking it is possible to bisect with uncommitted changes,
provided these changes don't touch the same files as the commits that
are being bisected. Otherwise checkout fails and an error is shown
in the status buffer. However if the very first checkout fails due
to this, then the failure is silent and to avoid that we disallow
bisecting with uncommitted changes altogether.
Fixes #3604.
Diffstat (limited to 'lisp/magit-bisect.el')
| -rw-r--r-- | lisp/magit-bisect.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el index 79abf99..8b1ee04 100644 --- a/lisp/magit-bisect.el +++ b/lisp/magit-bisect.el @@ -83,6 +83,8 @@ other actions from the bisect popup (\ (user-error "The good revision (%s) has to be an ancestor of the bad one (%s)" good bad)) + (when (magit-anything-modified-p) + (user-error "Cannot bisect with uncommitted changes")) (magit-git-bisect "start" (list bad good) t)) (defun magit-bisect-start-read-args () |
