浏览代码

Refactor

master
10sr 5 年前
父节点
当前提交
b58ee14be0
签署人:: 10sr GPG 密钥 ID: C384BB17CBB19347
共有 1 个文件被更改,包括 15 次插入6 次删除
  1. +15
    -6
      emacs.el

+ 15
- 6
emacs.el 查看文件

@@ -1,6 +1,6 @@
;;; emacs.el --- 10sr emacs initialization

;; Time-stamp: <2018-10-16 18:18:24 JST 10sr>
;; Time-stamp: <2018-10-16 22:44:44 JST 10sr>

;;; Code:

@@ -2684,6 +2684,16 @@ This function does the following things:
(add-to-list 'git-walktree-known-child-revisions
child-revision))))

(defun git-walktree--completing-read-commitish (prompt-format collection)
"Emit PROMPT and get commitish from COLLECTION from user input."
(completing-read (format prompt-format
(mapconcat 'git-walktree--commitish-fordisplay
collection
" "))
collection
nil
t))

(defun git-walktree-parent-revision ()
"Open parent revision of current path.
If current path was not found in the parent revision try to go up path."
@@ -2696,17 +2706,16 @@ If current path was not found in the parent revision try to go up path."
(1
(git-walktree--parent-revision-1 (car parents)))
(t
(let ((parent (completing-read "This revision has multiple parents. Which to open? (default is the left one): "
parents
nil
t
(car parents))))
(let ((parent (git-walktree--completing-read-commitish "This revision has multiple parents. Which to open? (%s) "
parents)))
(git-walktree--parent-revision-1 parent)))))))

;; TODO: this name is good?
;; What is revision?
;; What is sha1?
;; What is object id?
;; commit id?
;; commit sha1?
(defun git-walktree--parent-sha1 (commitish)
"Return list of parent commits of COMMITISH in sha1 string."
(let ((type (git-walktree--git-plumbing "cat-file"


正在加载...
取消
保存