Use sha1 to differetiate between stashes, not stash number
This commit is contained in:
parent
f754864373
commit
6e9e517e6f
1 changed files with 4 additions and 3 deletions
7
magit.el
7
magit.el
|
@ -2915,8 +2915,9 @@ Prefix arg means justify as well."
|
|||
(when (magit-section-p stash)
|
||||
(setq stash (magit-section-info stash)))
|
||||
(let ((dir default-directory)
|
||||
(buf (get-buffer-create "*magit-stash*")))
|
||||
(cond ((and (equal magit-currently-shown-stash stash)
|
||||
(buf (get-buffer-create "*magit-stash*"))
|
||||
(stash-id (magit-git-string "rev-list" "-1" stash)))
|
||||
(cond ((and (equal magit-currently-shown-stash stash-id)
|
||||
(with-current-buffer buf
|
||||
(> (length (buffer-string)) 1)))
|
||||
(let ((win (get-buffer-window buf)))
|
||||
|
@ -2926,7 +2927,7 @@ Prefix arg means justify as well."
|
|||
(with-selected-window win
|
||||
(funcall scroll))))))
|
||||
(t
|
||||
(setq magit-currently-shown-stash stash)
|
||||
(setq magit-currently-shown-stash stash-id)
|
||||
(display-buffer buf)
|
||||
(with-current-buffer buf
|
||||
(set-buffer buf)
|
||||
|
|
Loading…
Add table
Reference in a new issue