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

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

[nongnu] elpa/git-commit 534c12b908 3/4: Drop unnecessary `t's from fina


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 534c12b908 3/4: Drop unnecessary `t's from final one-form cond clauses
Date: Wed, 1 May 2024 21:59:59 -0400 (EDT)

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

    Drop unnecessary `t's from final one-form cond clauses
---
 lisp/magit-blame.el   |  2 +-
 lisp/magit-extras.el  |  4 ++--
 lisp/magit-git.el     | 12 ++++++------
 lisp/magit-log.el     |  4 ++--
 lisp/magit-push.el    |  6 +++---
 lisp/magit-section.el |  2 +-
 lisp/magit-tag.el     | 10 +++++-----
 lisp/magit-wip.el     |  6 +++---
 8 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index 47a2dd33f6..084e1e1923 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -274,7 +274,7 @@ Also see option `magit-blame-styles'."
                                    (error "Cannot get blame chunk at eob"))
                                (car (magit-blame--parse-chunk type))))))
                    (noerror nil)
-                   (t (error "Buffer does not visit a tracked file")))))))
+                   ((error "Buffer does not visit a tracked file")))))))
 
 (defun magit-blame-chunk-at (pos)
   (--some (overlay-get it 'magit-blame-chunk)
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 93c3c96155..e208f4a2ff 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -407,7 +407,7 @@ in HEAD as well as staged changes in the diff to check."
          (setq-local diff-vc-revisions (list rev1 rev2))
          (setq-local diff-vc-backend 'Git)
          (diff-add-log-current-defuns)))))
-   (t (user-error "`magit-generate-changelog' requires Emacs 27 or greater"))))
+   ((user-error "`magit-generate-changelog' requires Emacs 27 or greater"))))
 
 ;;;###autoload
 (defun magit-add-change-log-entry (&optional whoami file-name other-window)
@@ -796,7 +796,7 @@ argument."
            (push (list value default-directory) magit-revision-stack)
            (kill-new (message "%s" (or (and current-prefix-arg ref)
                                        value)))))
-        (t (kill-new (message "%s" value))))))))
+        ((kill-new (message "%s" value))))))))
 
 ;;;###autoload
 (defun magit-copy-buffer-revision ()
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index ae7824e7d4..41794ab469 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -671,9 +671,9 @@ using `magit-debug-git-executable'.")
                          (push (cons host version)
                                magit--host-git-version-cache)
                          version))))
-               (t (error "Unexpected \"%s --version\" output: %S"
-                         (magit-git-executable)
-                         output)))))))))
+               ((error "Unexpected \"%s --version\" output: %S"
+                       (magit-git-executable)
+                       output)))))))))
 
 (defun magit-git-version-assert (&optional minimal who)
   "Assert that the used Git version is greater than or equal to MINIMAL.
@@ -1004,7 +1004,7 @@ is non-nil, in which case return nil."
        (let ((gitdir (magit-gitdir)))
          (cond (gitdir (file-in-directory-p default-directory gitdir))
                (noerror nil)
-               (t (signal 'magit-outside-git-repo default-directory))))))
+               ((signal 'magit-outside-git-repo default-directory))))))
 
 (defun magit-inside-worktree-p (&optional noerror)
   "Return t if `default-directory' is below the working directory.
@@ -1365,7 +1365,7 @@ string \"true\", otherwise return nil."
 If REV is nil or has the form \":/TEXT\", return REV itself."
   (cond ((not rev) nil)
         ((string-match-p "^:/" rev) rev)
-        (t (concat rev "^{commit}"))))
+        ((concat rev "^{commit}"))))
 
 (defun magit-rev-equal (a b)
   "Return t if there are no differences between the commits A and B."
@@ -1457,7 +1457,7 @@ Git."
            (if (magit-ref-ambiguous-p (match-string 1 name))
                name
              (match-string 1 name)))
-          (t (magit-ref-maybe-qualify name)))))
+          ((magit-ref-maybe-qualify name)))))
 
 (defun magit-name-branch (rev &optional lax)
   (or (magit-name-local-branch rev)
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index abfb558502..8d2f8f2c15 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -685,7 +685,7 @@ previously checked out branch and its upstream and 
push-target."
                     (setq rebase (magit-ref-abbrev rebase))
                     (setq current rebase)
                     (setq head "HEAD"))
-                   (t (setq current (magit-get-previous-branch)))))
+                   ((setq current (magit-get-previous-branch)))))
            (cond (current
                   (setq current
                         (magit--propertize-face current'magit-branch-local))
@@ -694,7 +694,7 @@ previously checked out branch and its upstream and 
push-target."
                   (when upstream
                     (setq upup (and (magit-local-branch-p upstream)
                                     (magit-get-upstream-branch upstream)))))
-                 (t (setq head "HEAD")))
+                 ((setq head "HEAD")))
            (delq nil (list current head target upstream upup)))
          (magit-log-arguments)))
   (magit-log-setup-buffer revs args files))
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index 2cee212d91..ddeeec9490 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -340,9 +340,9 @@ what this command will do.  To add it use something like:
                             ((not (string-match "/" ref))
                              (magit--propertize-face (format "%s/%s" remote 
ref)
                                                      'magit-branch-remote))
-                            (t (format "%s as %s"
-                                       (magit--propertize-face remote 'bold)
-                                       (magit--propertize-face ref 'bold)))))
+                            ((format "%s as %s"
+                                     (magit--propertize-face remote 'bold)
+                                     (magit--propertize-face ref 'bold)))))
                  "nothing (no upstream)")))
             ("matching" (format "all matching to %s"
                                 (magit--propertize-face remote 'bold)))))))))
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 2b39533409..0869ccc20f 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -956,7 +956,7 @@ With a prefix argument also expand it." heading)
          (user-error "Cannot hide root section"))
         ((oref section hidden)
          (magit-section-show section))
-        (t (magit-section-hide section))))
+        ((magit-section-hide section))))
 
 (defun magit-section-toggle-children (section)
   "Toggle visibility of bodies of children of the current section."
diff --git a/lisp/magit-tag.el b/lisp/magit-tag.el
index 74b8fd4e16..13a3474072 100644
--- a/lisp/magit-tag.el
+++ b/lisp/magit-tag.el
@@ -199,11 +199,11 @@ like \"/path/to/foo-bar\"."
                           (replace-match ver t t pmsg))
                          ((and ptag (string-match (regexp-quote ptag) pmsg))
                           (replace-match tag t t pmsg))
-                         (t (format "%s %s"
-                                    (capitalize
-                                     (file-name-nondirectory
-                                      (directory-file-name (magit-toplevel))))
-                                    ver)))))
+                         ((format "%s %s"
+                                  (capitalize
+                                   (file-name-nondirectory
+                                    (directory-file-name (magit-toplevel))))
+                                  ver)))))
              args))))
   (magit-run-git-with-editor "tag" args (and msg (list "-m" msg)) tag)
   (set-process-sentinel
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el
index ff8c24a8d5..cbd90d3106 100644
--- a/lisp/magit-wip.el
+++ b/lisp/magit-wip.el
@@ -359,9 +359,9 @@ commit message."
         (setq msg (concat
                    (cond ((= len 0) "autosave tracked files")
                          ((> len 1) (format "autosave %s files" len))
-                         (t (concat "autosave "
-                                    (file-relative-name (car files)
-                                                        (magit-toplevel)))))
+                         ((concat "autosave "
+                                  (file-relative-name (car files)
+                                                      (magit-toplevel)))))
                    msg))))
     (magit-update-ref wipref msg
                       (magit-git-string "commit-tree" "--no-gpg-sign"



reply via email to

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