emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 1553a4fa36 11/26: Use and-let* for side-effects


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 1553a4fa36 11/26: Use and-let* for side-effects
Date: Fri, 22 Apr 2022 18:58:14 -0400 (EDT)

branch: elpa/git-commit
commit 1553a4fa36634c18377991d945ed6695e6b42803
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Use and-let* for side-effects
---
 lisp/git-rebase.el      |   2 +-
 lisp/magit-branch.el    |   8 +--
 lisp/magit-commit.el    |   2 +-
 lisp/magit-diff.el      |   6 +-
 lisp/magit-extras.el    |   2 +-
 lisp/magit-git.el       | 163 ++++++++++++++++++++++++------------------------
 lisp/magit-gitignore.el |   2 +-
 lisp/magit-libgit.el    |   2 +-
 lisp/magit-log.el       |  10 +--
 lisp/magit-merge.el     |   2 +-
 lisp/magit-mode.el      |  48 +++++++-------
 lisp/magit-notes.el     |  26 ++++----
 lisp/magit-patch.el     |   4 +-
 lisp/magit-process.el   |   2 +-
 lisp/magit-pull.el      |   2 +-
 lisp/magit-push.el      |  18 +++---
 lisp/magit-repos.el     |  18 +++---
 lisp/magit-section.el   |  62 +++++++++---------
 lisp/magit-sequence.el  |   6 +-
 lisp/magit-transient.el |   2 +-
 lisp/magit-wip.el       |   4 +-
 21 files changed, 197 insertions(+), 194 deletions(-)

diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index f3fcd6df74..f33328e565 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -318,7 +318,7 @@ instance with all nil values is returned."
                              git-rebase-line-regexps)))
         (git-rebase-action
          :action-type    type
-         :action         (when-let ((action (match-string-no-properties 1)))
+         :action         (and-let* ((action (match-string-no-properties 1)))
                            (or (cdr (assoc action git-rebase-short-options))
                                action))
          :action-options (match-string-no-properties 2)
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index 7b6e27e8b4..a81890ca55 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -873,10 +873,10 @@ and also rename the respective reflog file."
 (cl-defmethod transient-infix-set ((obj magit--git-branch:upstream) refname)
   (magit-set-upstream-branch (oref transient--prefix scope) refname)
   (oset obj value
-        (let ((branch (oref transient--prefix scope)))
-          (when-let ((r (magit-get "branch" branch "remote"))
-                     (m (magit-get "branch" branch "merge")))
-            (list r m))))
+        (and-let* ((branch (oref transient--prefix scope))
+                   (r (magit-get "branch" branch "remote"))
+                   (m (magit-get "branch" branch "merge")))
+          (list r m)))
   (magit-refresh))
 
 (cl-defmethod transient-format ((obj magit--git-branch:upstream))
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 581f5bbf88..2b90762a5b 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -189,7 +189,7 @@ Also see https://github.com/magit/magit/issues/4132.";
                               (fpr (epg-sub-key-fingerprint key))
                               (id  (epg-sub-key-id key))
                               (author
-                               (when-let ((id-obj
+                               (and-let* ((id-obj
                                            (car (epg-key-user-id-list cert))))
                                  (let ((id-str (epg-user-id-string id-obj)))
                                    (if (stringp id-str)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index a5619dc31d..f942b42bdf 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1346,7 +1346,7 @@ for a revision."
               (magit-diff--goto-position file line col))))))))
 
 (defun magit-diff--locate-hunk (file line &optional parent)
-  (when-let ((diff (cl-find-if (lambda (section)
+  (and-let* ((diff (cl-find-if (lambda (section)
                                  (and (cl-typep section 'magit-file-section)
                                       (equal (oref section value) file)))
                                (oref (or parent magit-root-section) 
children))))
@@ -2116,7 +2116,7 @@ keymap is the parent of their keymaps.")
 
 (defun magit-diff-use-window-width-as-stat-width ()
   "Use the `window-width' as the value of `--stat-width'."
-  (when-let ((window (get-buffer-window (current-buffer) 'visible)))
+  (and-let* ((window (get-buffer-window (current-buffer) 'visible)))
     (list (format "--stat-width=%d" (window-width window)))))
 
 (defun magit-diff-wash-diffs (args &optional limit)
@@ -3390,7 +3390,7 @@ last (visual) lines of the region."
 (defun magit-diff-inside-hunk-body-p ()
   "Return non-nil if point is inside the body of a hunk."
   (and (magit-section-match 'hunk)
-       (when-let ((content (oref (magit-current-section) content)))
+       (and-let* ((content (oref (magit-current-section) content)))
          (> (magit-point) content))))
 
 ;;; Diff Extract
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 2d4e186cda..5b584a56fd 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -253,7 +253,7 @@ With a prefix argument, visit in another window.  If there
 is no file at point, then instead visit `default-directory'."
   (interactive "P")
   (dired-jump other-window
-              (when-let ((file (magit-file-at-point)))
+              (and-let* ((file (magit-file-at-point)))
                 (expand-file-name (if (file-directory-p file)
                                       (file-name-as-directory file)
                                     file)))))
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 15d6ed445b..46fc791ca4 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -138,14 +138,14 @@ successfully.")
   (or (and (eq system-type 'windows-nt)
            ;; Avoid the wrappers "cmd/git.exe" and "cmd/git.cmd",
            ;; which are much slower than using "bin/git.exe" directly.
-           (--when-let (executable-find "git")
+           (and-let* ((exec (executable-find "git")))
              (ignore-errors
                ;; Git for Windows 2.x provides cygpath so we can
                ;; ask it for native paths.
                (let* ((core-exe
                        (car
                         (process-lines
-                         it "-c"
+                         exec "-c"
                          "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x"
                          "X" "git")))
                       (hack-entry (assoc core-exe magit-git-w32-path-hack))
@@ -154,7 +154,7 @@ successfully.")
                       (path-hack
                        (list (concat "PATH="
                                      (car (process-lines
-                                           it "-c"
+                                           exec "-c"
                                            "alias.P=!cygpath -wp \"$PATH\""
                                            "P"))))))
                  ;; The defcustom STANDARD expression can be
@@ -805,10 +805,11 @@ the directory is not located inside a Git repository, 
then return
 nil."
   (magit--with-refresh-cache (list default-directory 'magit-git-dir path)
     (magit--with-safe-default-directory nil
-      (when-let ((dir (magit-rev-parse-safe "--git-dir")))
-        (setq dir (file-name-as-directory (magit-expand-git-file-name dir)))
-        (unless (file-remote-p dir)
-          (setq dir (concat (file-remote-p default-directory) dir)))
+      (and-let* ((dir (magit-rev-parse-safe "--git-dir"))
+                 (dir (file-name-as-directory (magit-expand-git-file-name 
dir)))
+                 (dir (if (file-remote-p dir)
+                          dir
+                        (concat (file-remote-p default-directory) dir))))
         (if path (expand-file-name (convert-standard-filename path) dir) 
dir)))))
 
 (defvar magit--separated-gitdirs nil)
@@ -873,21 +874,22 @@ returning the truename."
                    (setq updir (if (file-name-absolute-p updir)
                                    (concat (file-remote-p default-directory) 
updir)
                                  (expand-file-name updir)))
-                   (let ((default-directory updir))
-                     (and (string-equal (magit-rev-parse-safe "--show-cdup") 
"")
-                          (--when-let (magit-rev-parse-safe "--show-toplevel")
-                            (string-equal (magit-expand-git-file-name it)
-                                          topdir))))))
+                   (and-let*
+                       ((default-directory updir)
+                        (top (and (string-equal
+                                   (magit-rev-parse-safe "--show-cdup") "")
+                                  (magit-rev-parse-safe "--show-toplevel"))))
+                     (string-equal (magit-expand-git-file-name top) topdir))))
                 updir
               (concat (file-remote-p default-directory)
                       (file-name-as-directory topdir))))
-        (when-let ((gitdir (magit-rev-parse-safe "--git-dir")))
-          (setq gitdir (file-name-as-directory
-                        (if (file-name-absolute-p gitdir)
-                            ;; We might have followed a symlink.
-                            (concat (file-remote-p default-directory)
-                                    (magit-expand-git-file-name gitdir))
-                          (expand-file-name gitdir))))
+        (and-let* ((gitdir (magit-rev-parse-safe "--git-dir"))
+                   (gitdir (file-name-as-directory
+                            (if (file-name-absolute-p gitdir)
+                                ;; We might have followed a symlink.
+                                (concat (file-remote-p default-directory)
+                                        (magit-expand-git-file-name gitdir))
+                              (expand-file-name gitdir)))))
           (if (magit-bare-repo-p)
               gitdir
             (let* ((link (expand-file-name "gitdir" gitdir))
@@ -1018,10 +1020,10 @@ tracked file."
                      (and (derived-mode-p 'dired-mode) default-directory)))))
   (when (and file (or (not tracked)
                       (magit-file-tracked-p (file-relative-name file))))
-    (--when-let (magit-toplevel
-                 (magit--safe-default-directory
-                  (directory-file-name (file-name-directory file))))
-      (file-relative-name file it))))
+    (and-let* ((dir (magit-toplevel
+                     (magit--safe-default-directory
+                      (directory-file-name (file-name-directory file))))))
+      (file-relative-name file dir))))
 
 (defun magit-file-tracked-p (file)
   (magit-git-success "ls-files" "--error-unmatch" file))
@@ -1239,7 +1241,7 @@ are considered."
   (or (cl-find-if (lambda (arg)
                     (string-prefix-p "--ignore-submodules" arg))
                   magit-buffer-diff-args)
-      (when-let ((value (magit-get "diff.ignoreSubmodules")))
+      (and-let* ((value (magit-get "diff.ignoreSubmodules")))
         (if return-argument
             (concat "--ignore-submodules=" value)
           (concat "diff.ignoreSubmodules=" value)))))
@@ -1332,7 +1334,7 @@ this function returns nil instead.  This is unfortunate 
because
 there might be other refs that do match.  To fix that, update
 Git."
   (if (magit-git-version< "2.13")
-      (when-let
+      (and-let*
           ((ref (magit-git-string "name-rev" "--name-only" "--no-undefined"
                                   (and pattern (concat "--refs=" pattern))
                                   rev)))
@@ -1354,8 +1356,8 @@ Git."
                       rev)))
 
 (defun magit-rev-branch (rev)
-  (--when-let (magit-rev-name rev "refs/heads/*")
-    (unless (string-match-p "[~^]" it) it)))
+  (and-let* ((name (magit-rev-name rev "refs/heads/*")))
+    (and (not (string-match-p "[~^]" name)) name)))
 
 (defun magit-get-shortname (rev)
   (let* ((fn (apply-partially #'magit-rev-name rev))
@@ -1377,16 +1379,16 @@ Git."
                    (magit-name-remote-branch rev t)))))
 
 (defun magit-name-local-branch (rev &optional lax)
-  (--when-let (magit-rev-name rev "refs/heads/*")
-    (and (or lax (not (string-match-p "[~^]" it))) it)))
+  (and-let* ((name (magit-rev-name rev "refs/heads/*")))
+    (and (or lax (not (string-match-p "[~^]" name))) name)))
 
 (defun magit-name-remote-branch (rev &optional lax)
-  (--when-let (magit-rev-name rev "refs/remotes/*")
-    (and (or lax (not (string-match-p "[~^]" it)))
-         (substring it 8))))
+  (and-let* ((name (magit-rev-name rev "refs/remotes/*")))
+    (and (or lax (not (string-match-p "[~^]" name)))
+         (substring name 8))))
 
 (defun magit-name-tag (rev &optional lax)
-  (when-let ((name (magit-rev-name rev "refs/tags/*")))
+  (when-let* ((name (magit-rev-name rev "refs/tags/*"))) ;debbugs#31840
     (when (string-suffix-p "^0" name)
       (setq name (substring name 0 -2)))
     (and (or lax (not (string-match-p "[~^]" name)))
@@ -1460,7 +1462,7 @@ to, or to some other symbolic-ref that points to the same 
ref."
            (memq (get-text-property (magit-point) 'font-lock-face)
                  (list 'magit-branch-local
                        'magit-branch-current))
-           (when-let ((branch (magit-thing-at-point 'git-revision t)))
+           (and-let* ((branch (magit-thing-at-point 'git-revision t)))
              (cdr (magit-split-branch-name branch))))
       (and (not (eq type 'local))
            (memq (get-text-property (magit-point) 'font-lock-face)
@@ -1487,7 +1489,7 @@ to, or to some other symbolic-ref that points to the same 
ref."
 (defun magit-commit-at-point ()
   (or (magit-section-value-if 'commit)
       (magit-thing-at-point 'git-revision t)
-      (when-let ((chunk (magit-current-blame-chunk 'addition t)))
+      (and-let* ((chunk (magit-current-blame-chunk 'addition t)))
         (oref chunk orig-rev))
       (and (derived-mode-p 'magit-stash-mode
                            'magit-merge-preview-mode
@@ -1507,7 +1509,7 @@ to, or to some other symbolic-ref that points to the same 
ref."
                      (magit-ref-p (format "refs/pullreqs/%s"
                                           (oref (oref it value) number))))))
       (magit-thing-at-point 'git-revision t)
-      (when-let ((chunk (magit-current-blame-chunk 'addition t)))
+      (and-let* ((chunk (magit-current-blame-chunk 'addition t)))
         (oref chunk orig-rev))
       (and magit-buffer-file-name
            magit-buffer-refname)
@@ -1577,7 +1579,7 @@ if any, nil otherwise.  If the upstream is not 
configured, the
 configured remote is an url, or the named branch does not exist,
 then return nil.  I.e.  return an existing local or
 remote-tracking branch ref."
-  (when-let ((branch (or branch (magit-get-current-branch))))
+  (and-let* ((branch (or branch (magit-get-current-branch))))
     (magit-ref-fullname (concat branch "@{upstream}"))))
 
 (defun magit-get-upstream-branch (&optional branch)
@@ -1590,7 +1592,7 @@ remote-tracking branch.  The returned string is colorized
 according to the branch type."
   (magit--with-refresh-cache
       (list default-directory 'magit-get-upstream-branch branch)
-    (when-let ((branch (or branch (magit-get-current-branch)))
+    (and-let* ((branch (or branch (magit-get-current-branch)))
                (upstream (magit-ref-abbrev (concat branch "@{upstream}"))))
       (magit--propertize-face
        upstream (if (equal (magit-get "branch" branch "remote") ".")
@@ -1617,7 +1619,7 @@ according to the branch type."
                 upstream)))))
 
 (defun magit-get-upstream-remote (&optional branch allow-unnamed)
-  (when-let ((branch (or branch (magit-get-current-branch)))
+  (and-let* ((branch (or branch (magit-get-current-branch)))
              (remote (magit-get "branch" branch "remote")))
     (and (not (equal remote "."))
          (cond ((member remote (magit-list-remotes))
@@ -1627,7 +1629,7 @@ according to the branch type."
                 (magit--propertize-face remote 'bold))))))
 
 (defun magit-get-unnamed-upstream (&optional branch)
-  (when-let ((branch (or branch (magit-get-current-branch)))
+  (and-let* ((branch (or branch (magit-get-current-branch)))
              (remote (magit-get "branch" branch "remote"))
              (merge  (magit-get "branch" branch "merge")))
     (and (magit--unnamed-upstream-p remote merge)
@@ -1645,14 +1647,14 @@ according to the branch type."
 
 (defun magit-get-current-remote (&optional allow-unnamed)
   (or (magit-get-upstream-remote nil allow-unnamed)
-      (when-let ((remotes (magit-list-remotes))
+      (and-let* ((remotes (magit-list-remotes))
                  (remote (if (= (length remotes) 1)
                              (car remotes)
                            (magit-primary-remote))))
         (magit--propertize-face remote 'magit-branch-remote))))
 
 (defun magit-get-push-remote (&optional branch)
-  (when-let ((remote
+  (and-let* ((remote
               (or (and (or branch (setq branch (magit-get-current-branch)))
                        (magit-get "branch" branch "pushRemote"))
                   (magit-get "remote.pushDefault"))))
@@ -1661,7 +1663,7 @@ according to the branch type."
 (defun magit-get-push-branch (&optional branch verify)
   (magit--with-refresh-cache
       (list default-directory 'magit-get-push-branch branch verify)
-    (when-let ((branch (or branch (setq branch (magit-get-current-branch))))
+    (and-let* ((branch (or branch (setq branch (magit-get-current-branch))))
                (remote (magit-get-push-remote branch))
                (target (concat remote "/" branch)))
       (and (or (not verify)
@@ -1682,7 +1684,7 @@ according to the branch type."
 
 (defun magit-get-some-remote (&optional branch)
   (or (magit-get-remote branch)
-      (when-let ((main (magit-main-branch)))
+      (and-let* ((main (magit-main-branch)))
         (magit-get-remote main))
       (magit-primary-remote)
       (car (magit-list-remotes))))
@@ -1731,14 +1733,14 @@ as into its upstream."
        (if (eq target t)
            (delete (magit-name-local-branch branch)
                    (magit-list-containing-branches branch))
-         (--when-let (or target (magit-get-current-branch))
-           (magit-git-success "merge-base" "--is-ancestor" branch it)))))
+         (and-let* ((target (or target (magit-get-current-branch))))
+           (magit-git-success "merge-base" "--is-ancestor" branch target)))))
 
 (defun magit-get-tracked (refname)
   "Return the remote branch tracked by the remote-tracking branch REFNAME.
 The returned value has the form (REMOTE . REF), where REMOTE is
 the name of a remote and REF is the ref local to the remote."
-  (when-let ((ref (magit-ref-fullname refname)))
+  (and-let* ((ref (magit-ref-fullname refname)))
     (save-match-data
       (seq-some (lambda (line)
                   (and (string-match "\
@@ -1775,16 +1777,17 @@ If optional WITH-DISTANCE is non-nil then return (TAG 
COMMITS),
 if it is `dirty' return (TAG COMMIT DIRTY). COMMITS is the number
 of commits in `HEAD' but not in TAG and DIRTY is t if there are
 uncommitted changes, nil otherwise."
-  (--when-let (magit-git-str "describe" "--long" "--tags"
-                             (and (eq with-distance 'dirty) "--dirty") rev)
+  (and-let* ((str (magit-git-str "describe" "--long" "--tags"
+                                 (and (eq with-distance 'dirty) "--dirty")
+                                 rev)))
     (save-match-data
       (string-match
-       "\\(.+\\)-\\(?:0[0-9]*\\|\\([0-9]+\\)\\)-g[0-9a-z]+\\(-dirty\\)?$" it)
+       "\\(.+\\)-\\(?:0[0-9]*\\|\\([0-9]+\\)\\)-g[0-9a-z]+\\(-dirty\\)?$" str)
       (if with-distance
-          `(,(match-string 1 it)
-            ,(string-to-number (or (match-string 2 it) "0"))
-            ,@(and (match-string 3 it) (list t)))
-        (match-string 1 it)))))
+          `(,(match-string 1 str)
+            ,(string-to-number (or (match-string 2 str) "0"))
+            ,@(and (match-string 3 str) (list t)))
+        (match-string 1 str)))))
 
 (defun magit-get-next-tag (&optional rev with-distance)
   "Return the closest tag from which REV is reachable.
@@ -1794,14 +1797,14 @@ If no such tag can be found or if the distance is 0 (in 
which
 case it is the current tag, not the next), return nil instead.
 If optional WITH-DISTANCE is non-nil, then return (TAG COMMITS)
 where COMMITS is the number of commits in TAG but not in REV."
-  (--when-let (magit-git-str "describe" "--contains" (or rev "HEAD"))
+  (and-let* ((str (magit-git-str "describe" "--contains" (or rev "HEAD"))))
     (save-match-data
-      (when (string-match "^[^^~]+" it)
-        (setq it (match-string 0 it))
-        (unless (equal it (magit-get-current-tag rev))
+      (when (string-match "^[^^~]+" str)
+        (setq str (match-string 0 str))
+        (unless (equal str (magit-get-current-tag rev))
           (if with-distance
-              (list it (car (magit-rev-diff-count it rev)))
-            it))))))
+              (list str (car (magit-rev-diff-count str rev)))
+            str))))))
 
 (defun magit-list-refs (&optional namespaces format sortby)
   "Return list of references.
@@ -1858,7 +1861,7 @@ SORTBY is a key or list of keys to pass to the `--sort' 
flag of
   (magit-list-related-branches "--no-merged" commit args))
 
 (defun magit-list-unmerged-to-upstream-branches ()
-  (--filter (when-let ((upstream (magit-get-upstream-branch it)))
+  (--filter (and-let* ((upstream (magit-get-upstream-branch it)))
               (member it (magit-list-unmerged-branches upstream)))
             (magit-list-local-branch-names)))
 
@@ -2091,8 +2094,8 @@ Return a list of two integers: (A>B B>A)."
                             "--not" commit)))))
 
 (defun magit-commit-parents (commit)
-  (--when-let (magit-git-string "rev-list" "-1" "--parents" commit)
-    (cdr (split-string it))))
+  (and-let* ((str (magit-git-string "rev-list" "-1" "--parents" commit)))
+    (cdr (split-string str))))
 
 (defun magit-patch-id (rev)
   (magit--with-connection-local-variables
@@ -2338,22 +2341,22 @@ and this option only controls what face is used.")
 
 (put 'git-revision 'thing-at-point #'magit-thingatpt--git-revision)
 (defun magit-thingatpt--git-revision ()
-  (--when-let
-      (let ((c "\s\n\t~^:?*[\\"))
-        (cl-letf (((get 'git-revision 'beginning-op)
-                   (lambda ()
-                     (if (re-search-backward (format "[%s]" c) nil t)
-                         (forward-char)
-                       (goto-char (point-min)))))
-                  ((get 'git-revision 'end-op)
-                   (lambda ()
-                     (re-search-forward (format "\\=[^%s]*" c) nil t))))
-          (bounds-of-thing-at-point 'git-revision)))
-    (let ((text (buffer-substring-no-properties (car it) (cdr it))))
-      (and (>= (length text) 7)
-           (string-match-p "[a-z]" text)
-           (magit-commit-p text)
-           text))))
+  (and-let* ((bounds
+              (let ((c "\s\n\t~^:?*[\\"))
+                (cl-letf (((get 'git-revision 'beginning-op)
+                           (lambda ()
+                             (if (re-search-backward (format "[%s]" c) nil t)
+                                 (forward-char)
+                               (goto-char (point-min)))))
+                          ((get 'git-revision 'end-op)
+                           (lambda ()
+                             (re-search-forward (format "\\=[^%s]*" c) nil 
t))))
+                  (bounds-of-thing-at-point 'git-revision))))
+             (string (buffer-substring-no-properties (car bounds) (cdr 
bounds))))
+    (and (>= (length string) 7)
+         (string-match-p "[a-z]" string)
+         (magit-commit-p string)
+         string)))
 
 ;;; Completion
 
@@ -2522,7 +2525,7 @@ out.  Only existing branches can be selected."
      (or (let ((r (car (member (magit-remote-branch-at-point) branches)))
                (l (car (member (magit-local-branch-at-point) branches))))
            (if magit-prefer-remote-upstream (or r l) (or l r)))
-         (when-let ((main (magit-main-branch)))
+         (and-let* ((main (magit-main-branch)))
            (let ((r (car (member (concat "origin/" main) branches)))
                  (l (car (member main branches))))
              (if magit-prefer-remote-upstream (or r l) (or l r))))
diff --git a/lisp/magit-gitignore.el b/lisp/magit-gitignore.el
index 7ff6469591..52dfab753a 100644
--- a/lisp/magit-gitignore.el
+++ b/lisp/magit-gitignore.el
@@ -121,7 +121,7 @@ Rules that are defined in that file affect all local 
repositories."
           (delete-dups
            (--mapcat
             (cons (concat "/" it)
-                  (when-let ((ext (file-name-extension it)))
+                  (and-let* ((ext (file-name-extension it)))
                     (list (concat "/" (file-name-directory it) "*." ext)
                           (concat "*." ext))))
             (sort (nconc
diff --git a/lisp/magit-libgit.el b/lisp/magit-libgit.el
index 812c90a69c..948b6e3b79 100644
--- a/lisp/magit-libgit.el
+++ b/lisp/magit-libgit.el
@@ -61,7 +61,7 @@
 (defun magit-libgit-repo (&optional directory)
   "Return an object for the repository in DIRECTORY.
 If optional DIRECTORY is nil, then use `default-directory'."
-  (when-let ((default-directory
+  (and-let* ((default-directory
               (let ((magit-inhibit-libgit t))
                 (magit-gitdir directory))))
     (magit--with-refresh-cache
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index b9e304be7f..97db32c590 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -612,7 +612,7 @@ the upstream isn't ahead of the current branch) show."
     map))
 
 (defun magit-log-read-revs (&optional use-current)
-  (or (and use-current (--when-let (magit-get-current-branch) (list it)))
+  (or (and use-current (and-let* ((buf (magit-get-current-branch))) (list 
buf)))
       (let ((crm-separator "\\(\\.\\.\\.?\\|[, ]\\)")
             (crm-local-completion-map magit-log-read-revs-map))
         (split-string (magit-completing-read-multiple*
@@ -882,9 +882,9 @@ limit.  Otherwise set it to 256."
   (magit-refresh))
 
 (defun magit-log-get-commit-limit ()
-  (--when-let (--first (string-match "^-n\\([0-9]+\\)?$" it)
-                       magit-buffer-log-args)
-    (string-to-number (match-string 1 it))))
+  (and-let* ((str (--first (string-match "^-n\\([0-9]+\\)?$" it)
+                           magit-buffer-log-args)))
+    (string-to-number (match-string 1 str))))
 
 ;;;; Mode Commands
 
@@ -936,7 +936,7 @@ of the current repository first; creating it if necessary."
   (with-current-buffer
       (cond ((derived-mode-p 'magit-log-mode)
              (current-buffer))
-            ((when-let ((buf (magit-get-mode-buffer 'magit-log-mode)))
+            ((and-let* ((buf (magit-get-mode-buffer 'magit-log-mode)))
                (pop-to-buffer-same-window buf)))
             (t
              (apply #'magit-log-all-branches (magit-log-arguments))))
diff --git a/lisp/magit-merge.el b/lisp/magit-merge.el
index 7deaa1b015..fc93d4615c 100644
--- a/lisp/magit-merge.el
+++ b/lisp/magit-merge.el
@@ -146,7 +146,7 @@ then also remove the respective remote branch."
                   (or (magit-get-current-branch)
                       (magit-rev-parse "HEAD")))
           nil
-          (when-let ((upstream (magit-get-upstream-branch))
+          (and-let* ((upstream (magit-get-upstream-branch))
                      (upstream (cdr (magit-split-branch-name upstream))))
             (and (magit-branch-p upstream) upstream)))
          (magit-merge-arguments)))
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index b937f10969..4fb0fe42d7 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -587,7 +587,7 @@ your mode instead of adding an entry to this variable.")
 (make-obsolete-variable 'magit-buffer-lock-functions nil "Magit 3.0.0")
 
 (cl-defgeneric magit-buffer-value ()
-  (when-let ((fn (cdr (assq major-mode magit-buffer-lock-functions))))
+  (and-let* ((fn (cdr (assq major-mode magit-buffer-lock-functions))))
     (funcall fn (with-no-warnings magit-refresh-args))))
 
 (defvar-local magit-previous-section nil)
@@ -1100,7 +1100,7 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
                        (lambda (window)
                          (with-selected-window window
                            (with-current-buffer buffer
-                             (when-let ((section (magit-section-at)))
+                             (and-let* ((section (magit-section-at)))
                                `(( ,window
                                    ,section
                                    
,@(magit-refresh-get-relative-position)))))))
@@ -1136,26 +1136,26 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
                                             magit-refresh-start-time)))))))
 
 (defun magit-refresh-get-relative-position ()
-  (when-let ((section (magit-current-section)))
-    (let ((start (oref section start))
-          (point (magit-point)))
-      (list (- (line-number-at-pos point)
-               (line-number-at-pos start))
-            (- point (line-beginning-position))
-            (and (magit-hunk-section-p section)
-                 (region-active-p)
-                 (progn (goto-char (line-beginning-position))
-                        (when  (looking-at "^[-+]") (forward-line))
-                        (while (looking-at "^[ @]") (forward-line))
-                        (let ((beg point))
-                          (cond ((looking-at "^[-+]")
-                                 (forward-line)
-                                 (while (looking-at "^[-+]") (forward-line))
-                                 (while (looking-at "^ ")    (forward-line))
-                                 (forward-line -1)
-                                 (regexp-quote (buffer-substring-no-properties
-                                                beg (line-end-position))))
-                                (t t)))))))))
+  (and-let* ((section (magit-current-section))
+             (start (oref section start))
+             (point (magit-point)))
+    (list (- (line-number-at-pos point)
+             (line-number-at-pos start))
+          (- point (line-beginning-position))
+          (and (magit-hunk-section-p section)
+               (region-active-p)
+               (progn (goto-char (line-beginning-position))
+                      (when  (looking-at "^[-+]") (forward-line))
+                      (while (looking-at "^[ @]") (forward-line))
+                      (let ((beg point))
+                        (cond ((looking-at "^[-+]")
+                               (forward-line)
+                               (while (looking-at "^[-+]") (forward-line))
+                               (while (looking-at "^ ")    (forward-line))
+                               (forward-line -1)
+                               (regexp-quote (buffer-substring-no-properties
+                                              beg (line-end-position))))
+                              (t t))))))))
 
 ;;; Save File-Visiting Buffers
 
@@ -1389,7 +1389,7 @@ Return a (KEY . VALUE) cons cell.
 The KEY is matched using `equal'.
 
 Unless specified, REPOSITORY is the current buffer's repository."
-  (when-let ((cache (assoc (or repository
+  (and-let* ((cache (assoc (or repository
                                (magit-repository-local-repository))
                            magit-repository-local-cache)))
     (assoc key (cdr cache))))
@@ -1491,7 +1491,7 @@ mentioned caches completely."
                                   (cdr magit--imenu-group-types)
                                   section))
                           (magit-section-match magit--imenu-group-types 
section))
-                        (when-let ((children (oref section children)))
+                        (and-let* ((children (oref section children)))
                           `((,(magit--imenu-index-name section)
                              ,@(mapcar (lambda (s)
                                          (cons (magit--imenu-index-name s)
diff --git a/lisp/magit-notes.el b/lisp/magit-notes.el
index 668e0bfb5a..3992254e6d 100644
--- a/lisp/magit-notes.el
+++ b/lisp/magit-notes.el
@@ -167,16 +167,16 @@ Also see `magit-notes-merge'."
 ;;; Readers
 
 (defun magit-notes-read-ref (prompt _initial-input history)
-  (--when-let (magit-completing-read
-               prompt (magit-list-notes-refnames) nil nil
-               (--when-let (magit-get "core.notesRef")
-                 (if (string-prefix-p "refs/notes/" it)
-                     (substring it 11)
-                   it))
-               history)
-    (if (string-prefix-p "refs/" it)
-        it
-      (concat "refs/notes/" it))))
+  (and-let* ((ref (magit-completing-read
+                   prompt (magit-list-notes-refnames) nil nil
+                   (and-let* ((def (magit-get "core.notesRef")))
+                     (if (string-prefix-p "refs/notes/" def)
+                         (substring def 11)
+                       def))
+                   history)))
+    (if (string-prefix-p "refs/" ref)
+        ref
+      (concat "refs/notes/" ref))))
 
 (defun magit-notes-read-refs (prompt &optional _initial-input _history)
   (mapcar (lambda (ref)
@@ -195,9 +195,9 @@ Also see `magit-notes-merge'."
 
 (defun magit-notes-read-args (prompt)
   (list (magit-read-branch-or-commit prompt (magit-stash-at-point))
-        (--when-let (--first (string-match "^--ref=\\(.+\\)" it)
-                             (transient-args 'magit-notes))
-          (match-string 1 it))))
+        (and-let* ((str (--first (string-match "^--ref=\\(.+\\)" it)
+                                 (transient-args 'magit-notes))))
+          (match-string 1 str))))
 
 ;;; _
 (provide 'magit-notes)
diff --git a/lisp/magit-patch.el b/lisp/magit-patch.el
index a8ccc68861..fe70316b97 100644
--- a/lisp/magit-patch.el
+++ b/lisp/magit-patch.el
@@ -119,7 +119,7 @@ which creates patches for all commits that are reachable 
from
       (save-match-data
         (find-file
          (expand-file-name
-          (concat (when-let ((v (transient-arg-value "--reroll-count=" args)))
+          (concat (and-let* ((v (transient-arg-value "--reroll-count=" args)))
                     (format "v%s-" v))
                   "0000-cover-letter.patch")
           (let ((topdir (magit-toplevel)))
@@ -254,7 +254,7 @@ which creates patches for all commits that are reachable 
from
      (list (expand-file-name
             (read-file-name "Apply patch: "
                             default-directory nil nil
-                            (when-let ((file (magit-file-at-point)))
+                            (and-let* ((file (magit-file-at-point)))
                               (file-relative-name file))))
            (transient-args 'magit-patch-apply))))
   (if (not file)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index bbd5730b97..6945a4b1db 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -875,7 +875,7 @@ from the user."
                       magit-process-password-prompt-regexps string)))
     (process-send-string
      process (magit-process-kill-on-abort process
-               (concat (or (when-let ((key (match-string 99 string)))
+               (concat (or (and-let* ((key (match-string 99 string)))
                              (run-hook-with-args-until-success
                               'magit-process-find-password-functions key))
                            (read-passwd prompt))
diff --git a/lisp/magit-pull.el b/lisp/magit-pull.el
index 947bf01996..60fd07914e 100644
--- a/lisp/magit-pull.el
+++ b/lisp/magit-pull.el
@@ -136,7 +136,7 @@ the upstream."
     (magit-run-git-with-editor "pull" args remote merge)))
 
 (defun magit-pull--upstream-description ()
-  (when-let ((branch (magit-get-current-branch)))
+  (and-let* ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index a0ab43ccef..fb852eafe8 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -161,7 +161,7 @@ the upstream."
     (magit-run-git-async "push" "-v" args remote (concat branch ":" merge))))
 
 (defun magit-push--upstream-description ()
-  (when-let ((branch (magit-get-current-branch)))
+  (and-let* ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
@@ -296,24 +296,24 @@ what this command will do.  For example:
 (defun magit-push-implicitly--desc ()
   (let ((default (magit-get "push.default")))
     (unless (equal default "nothing")
-      (or (when-let ((remote (or (magit-get-remote)
+      (or (and-let* ((remote (or (magit-get-remote)
                                  (magit-primary-remote)))
                      (refspec (magit-get "remote" remote "push")))
             (format "%s using %s"
                     (magit--propertize-face remote 'magit-branch-remote)
                     (magit--propertize-face refspec 'bold)))
-          (--when-let (and (not (magit-get-push-branch))
-                           (magit-get-upstream-branch))
+          (and-let* ((upstream (and (not (magit-get-push-branch))
+                                    (magit-get-upstream-branch))))
             (format "%s aka %s\n"
-                    (magit-branch-set-face it)
+                    (magit-branch-set-face upstream)
                     (magit--propertize-face "@{upstream}" 'bold)))
-          (--when-let (magit-get-push-branch)
+          (and-let* ((push-branch (magit-get-push-branch)))
             (format "%s aka %s\n"
-                    (magit-branch-set-face it)
+                    (magit-branch-set-face push-branch)
                     (magit--propertize-face "pushRemote" 'bold)))
-          (--when-let (magit-get-@{push}-branch)
+          (and-let* ((push-branch (magit-get-@{push}-branch)))
             (format "%s aka %s\n"
-                    (magit-branch-set-face it)
+                    (magit-branch-set-face push-branch)
                     (magit--propertize-face "@{push}" 'bold)))
           (format "using %s (%s is %s)\n"
                   (magit--propertize-face "git push"     'bold)
diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el
index 2d2022dcce..3432dc1c6f 100644
--- a/lisp/magit-repos.el
+++ b/lisp/magit-repos.el
@@ -374,7 +374,7 @@ Usually this is just its basename."
 
 (defun magit-repolist-column-version (_)
   "Insert a description of the repository's `HEAD' revision."
-  (when-let ((v (or (magit-git-string "describe" "--tags" "--dirty")
+  (and-let* ((v (or (magit-git-string "describe" "--tags" "--dirty")
                     ;; If there are no tags, use the date in MELPA format.
                     (magit-git-string "show" "--no-patch" "--format=%cd-g%h"
                                       "--date=format:%Y%m%d.%H%M"))))
@@ -438,23 +438,23 @@ which only lists the first one found."
 
 (defun magit-repolist-column-unpulled-from-upstream (spec)
   "Insert number of upstream commits not in the current branch."
-  (--when-let (magit-get-upstream-branch)
-    (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" it)) 
spec)))
+  (and-let* ((br (magit-get-upstream-branch)))
+    (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" br)) 
spec)))
 
 (defun magit-repolist-column-unpulled-from-pushremote (spec)
   "Insert number of commits in the push branch but not the current branch."
-  (--when-let (magit-get-push-branch nil t)
-    (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" it)) 
spec)))
+  (and-let* ((br (magit-get-push-branch nil t)))
+    (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" br)) 
spec)))
 
 (defun magit-repolist-column-unpushed-to-upstream (spec)
   "Insert number of commits in the current branch but not its upstream."
-  (--when-let (magit-get-upstream-branch)
-    (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" it)) spec)))
+  (and-let* ((br (magit-get-upstream-branch)))
+    (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" br)) spec)))
 
 (defun magit-repolist-column-unpushed-to-pushremote (spec)
   "Insert number of commits in the current branch but not its push branch."
-  (--when-let (magit-get-push-branch nil t)
-    (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" it)) spec)))
+  (and-let* ((br (magit-get-push-branch nil t)))
+    (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" br)) spec)))
 
 (defun magit-repolist-column-branches (spec)
   "Insert number of branches."
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index c939bf853b..87a132d447 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -478,7 +478,7 @@ the click occured.  Otherwise return the section at point."
 The return value has the form ((TYPE . VALUE)...)."
   (cons (cons (oref section type)
               (magit-section-ident-value section))
-        (when-let ((parent (oref section parent)))
+        (and-let* ((parent (oref section parent)))
           (magit-section-ident parent))))
 
 (cl-defgeneric magit-section-ident-value (object)
@@ -532,7 +532,7 @@ instead of in the one whose root `magit-root-section' is."
   "Return the lineage of SECTION.
 The return value has the form (TYPE...)."
   (cons (oref section type)
-        (when-let ((parent (oref section parent)))
+        (and-let* ((parent (oref section parent)))
           (magit-section-lineage parent))))
 
 (defvar magit-insert-section--current nil "For internal use only.")
@@ -995,8 +995,8 @@ hidden."
 When the body of an ancestor of SECTION is collapsed then
 SECTION's body (and heading) obviously cannot be visible."
   (or (oref section hidden)
-      (--when-let (oref section parent)
-        (magit-section-invisible-p it))))
+      (and-let* ((parent (oref section parent)))
+        (magit-section-invisible-p parent))))
 
 (defun magit-section-show-level (level)
   "Show surrounding sections up to LEVEL.
@@ -1093,12 +1093,12 @@ section lineage.  This command is intended for 
debugging purposes."
                      (if ident
                          (magit-section-ident section)
                        (apply #'vector (magit-section-lineage section)))
-                     (when-let ((m (oref section start)))
+                     (and-let* ((m (oref section start)))
                        (marker-position m))
                      (if-let ((m (oref section content)))
                          (format "[%s-]" (marker-position m))
                        "")
-                     (when-let ((m (oref section end)))
+                     (and-let* ((m (oref section end)))
                        (marker-position m)))))
     (if (called-interactively-p 'any)
         (message "%s" str)
@@ -1198,7 +1198,7 @@ of course you want to be that precise."
 (defun magit-section-match-2 (condition section)
   (if (eq (car condition) '*)
       (or (magit-section-match-2 (cdr condition) section)
-          (when-let ((parent (oref section parent)))
+          (and-let* ((parent (oref section parent)))
             (magit-section-match-2 condition parent)))
     (and (let ((c (car condition)))
            (if (class-p c)
@@ -1207,7 +1207,7 @@ of course you want to be that precise."
                  (cl-typep section class)
                (eq (oref section type) c))))
          (or (not (setq condition (cdr condition)))
-             (when-let ((parent (oref section parent)))
+             (and-let* ((parent (oref section parent)))
                (magit-section-match-2 condition parent))))))
 
 (defun magit-section-value-if (condition &optional section)
@@ -1219,7 +1219,7 @@ then return nil.  If the section does not match, then 
return
 nil.
 
 See `magit-section-match' for the forms CONDITION can take."
-  (when-let ((section (or section (magit-current-section))))
+  (and-let* ((section (or section (magit-current-section))))
     (and (magit-section-match condition section)
          (oref section value))))
 
@@ -1702,19 +1702,19 @@ invisible."
                        (point-min)))))))
 
 (defun magit-section-goto-successor-1 (section)
-  (or (--when-let (pcase (oref section type)
-                    (`staged 'unstaged)
-                    (`unstaged 'staged)
-                    (`unpushed 'unpulled)
-                    (`unpulled 'unpushed))
-        (magit-get-section `((,it) (status))))
-      (--when-let (car (magit-section-siblings section 'next))
-        (magit-get-section (magit-section-ident it)))
-      (--when-let (car (magit-section-siblings section 'prev))
-        (magit-get-section (magit-section-ident it)))
-      (--when-let (oref section parent)
-        (or (magit-get-section (magit-section-ident it))
-            (magit-section-goto-successor-1 it)))))
+  (or (and-let* ((alt (pcase (oref section type)
+                        (`staged 'unstaged)
+                        (`unstaged 'staged)
+                        (`unpushed 'unpulled)
+                        (`unpulled 'unpushed))))
+        (magit-get-section `((,alt) (status))))
+      (and-let* ((next (car (magit-section-siblings section 'next))))
+        (magit-get-section (magit-section-ident next)))
+      (and-let* ((prev (car (magit-section-siblings section 'prev))))
+        (magit-get-section (magit-section-ident prev)))
+      (and-let* ((parent (oref section parent)))
+        (or (magit-get-section (magit-section-ident parent))
+            (magit-section-goto-successor-1 parent)))))
 
 ;;; Region
 
@@ -1890,11 +1890,11 @@ invisible."
             (memq section (if sselection
                               selection
                             (setq selection (magit-region-sections))))
-            (--when-let (oref section parent)
-              (magit-section-selected-p it selection)))))
+            (and-let* ((parent (oref section parent)))
+              (magit-section-selected-p parent selection)))))
 
 (defun magit-section-parent-value (section)
-  (when-let ((parent (oref section parent)))
+  (and-let* ((parent (oref section parent)))
     (oref parent value)))
 
 (defun magit-section-siblings (section &optional direction)
@@ -1904,12 +1904,12 @@ If optional DIRECTION is `prev', then return siblings 
that come
 before SECTION.  If it is `next', then return siblings that come
 after SECTION.  For all other values, return all siblings
 excluding SECTION itself."
-  (when-let ((parent (oref section parent)))
-    (let ((siblings (oref parent children)))
-      (pcase direction
-        (`prev  (cdr (member section (reverse siblings))))
-        (`next  (cdr (member section siblings)))
-        (_      (remq section siblings))))))
+  (and-let* ((parent (oref section parent))
+             (siblings (oref parent children)))
+    (pcase direction
+      (`prev  (cdr (member section (reverse siblings))))
+      (`next  (cdr (member section siblings)))
+      (_      (remq section siblings)))))
 
 (defun magit-region-values (&optional condition multiple)
   "Return a list of the values of the selected sections.
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index c5d9be2495..acca50ee73 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -616,7 +616,7 @@ the upstream."
     (magit-git-rebase upstream args)))
 
 (defun magit-rebase--upstream-description ()
-  (when-let ((branch (magit-get-current-branch)))
+  (and-let* ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
@@ -999,8 +999,8 @@ status buffer (i.e. the reverse of how they will be 
applied)."
   (magit-sequence-insert-sequence
    (magit-file-line (magit-git-dir "rebase-merge/stopped-sha"))
    onto
-   (--when-let (magit-file-lines (magit-git-dir "rebase-merge/done"))
-     (cadr (split-string (car (last it)))))))
+   (and-let* ((lines (magit-file-lines (magit-git-dir "rebase-merge/done"))))
+     (cadr (split-string (car (last lines)))))))
 
 (defun magit-rebase-insert-apply-sequence (onto)
   (let ((rewritten
diff --git a/lisp/magit-transient.el b/lisp/magit-transient.el
index 3957e51b73..c168fdad1f 100644
--- a/lisp/magit-transient.el
+++ b/lisp/magit-transient.el
@@ -173,7 +173,7 @@
          (default  (if (functionp defaultp) (funcall defaultp obj) defaultp))
          (fallback (oref obj fallback))
          (fallback (and fallback
-                        (when-let ((val (magit-get fallback)))
+                        (and-let* ((val (magit-get fallback)))
                           (concat fallback ":" val)))))
     (if (not globalp)
         (setq value (magit-git-string "config" "--local"  variable))
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el
index adcd8da639..bed353fa95 100644
--- a/lisp/magit-wip.el
+++ b/lisp/magit-wip.el
@@ -369,7 +369,7 @@ commit message."
 (defun magit--wip-ref (namespace &optional ref)
   (concat magit-wip-namespace namespace
           (or (and ref (string-prefix-p "refs/" ref) ref)
-              (when-let ((branch (and (not (equal ref "HEAD"))
+              (and-let* ((branch (and (not (equal ref "HEAD"))
                                       (or ref (magit-get-current-branch)))))
                 (concat "refs/heads/" branch))
               "HEAD")))
@@ -436,7 +436,7 @@ many \"branches\" of each wip ref are shown."
                           args files))
 
 (defun magit-wip-log-get-tips (wipref count)
-  (when-let ((reflog (magit-git-lines "reflog" wipref)))
+  (and-let* ((reflog (magit-git-lines "reflog" wipref)))
     (let (tips)
       (while (and reflog (> count 1))
         ;; "start autosaving ..." is the current message, but it used



reply via email to

[Prev in Thread] Current Thread [Next in Thread]