branch: elpa-admin commit fd19544fba19da9060b62dfc6cbcaa04a148698a Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
* elpa-admin.el (elpaa--select-revision): Simplify --- elpa-admin.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/elpa-admin.el b/elpa-admin.el index e8a268b825..75fb8dc519 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -349,11 +349,9 @@ returns. Return the selected revision." (with-temp-buffer ;; Re-select the original branch/commit. (elpaa--call t "git" "clean" "-x" "-d" "-f") - (if oldrev - (elpaa--call t "git" "reset" "--hard" oldrev) - (elpaa--call t "git" "reset" "--hard") - (when oldbranch - (elpaa--call t "git" "checkout" oldbranch))) + (elpaa--call t "git" "reset" "--hard" oldrev) + (when oldbranch + (elpaa--call t "git" "checkout" oldbranch)) (elpaa--message "Restored the head revision\n%s" (buffer-string)))))))) (or rev cur-rev)))