diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2015-08-11 16:39:18 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2015-08-11 16:39:18 +0200 |
| commit | e29087e6f8a070349f8d60c7374dc8356887a0ed (patch) | |
| tree | d0cc9773a7f23dd7d05e339dedb235f506a5ead5 /lisp | |
| parent | 629e2adcdf5e20e58ad042d0a6f9be1422c30fbd (diff) | |
magit-wip-update-wipref: add type suffix to restart messages
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/magit-wip.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el index 22f4d10..4be9d13 100644 --- a/lisp/magit-wip.el +++ b/lisp/magit-wip.el @@ -180,7 +180,7 @@ only commit changes to FILES using MSG as commit message." (and cached-only "--cached") parent "--" files) (magit-wip-update-wipref wipref (magit-git-string "write-tree") - parent files msg)))) + parent files msg "index")))) (defun magit-wip-commit-worktree (ref files msg) (let* ((wipref (concat magit-wip-namespace "wtree/" ref)) @@ -192,9 +192,9 @@ only commit changes to FILES using MSG as commit message." (magit-call-git "add" "-u" "."))) (magit-git-string "write-tree")))) (when (magit-git-failure "diff-tree" "--quiet" parent tree "--" files) - (magit-wip-update-wipref wipref tree parent files msg)))) + (magit-wip-update-wipref wipref tree parent files msg "worktree")))) -(defun magit-wip-update-wipref (wipref tree parent files msg) +(defun magit-wip-update-wipref (wipref tree parent files msg start-msg) (let ((len (length files))) (unless (and msg (not (= (aref msg 0) ?\s))) (setq msg (concat @@ -206,9 +206,10 @@ only commit changes to FILES using MSG as commit message." msg))) (magit-reflog-enable wipref) (unless (equal parent wipref) - (magit-call-git "update-ref" wipref "-m" "restart autosaving" + (setq start-msg (concat "restart autosaving " start-msg)) + (magit-call-git "update-ref" wipref "-m" start-msg (magit-git-string "commit-tree" "-p" parent - "-m" "restart autosaving" + "-m" start-msg (concat parent "^{tree}"))) (setq parent wipref)) (magit-call-git "update-ref" wipref "-m" msg |
