aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/magit-base.el2
-rw-r--r--lisp/magit-commit.el2
-rw-r--r--lisp/magit-diff.el2
-rw-r--r--lisp/magit-git.el6
-rw-r--r--lisp/magit-sequence.el4
5 files changed, 8 insertions, 8 deletions
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index e14bfe5..6add5a0 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -1181,7 +1181,7 @@ or (last of all) the value of EXP."
;;;###autoload
(defun org-man-export--magit-gitman (fn link description format)
(if (and (eq format 'texinfo)
- (string-match-p "\\`git" link))
+ (string-prefix-p "git" link))
(replace-regexp-in-string "%s" link "
@ifinfo
@ref{%s,,,gitman,}.
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 8eabac5..581f5bb 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -370,7 +370,7 @@ depending on the value of option `magit-commit-squash-confirm'."
(magit-call-git
"commit" "--no-gpg-sign"
(-remove-first
- (apply-partially #'string-match-p "\\`--gpg-sign=")
+ (apply-partially #'string-prefix-p "--gpg-sign=")
args)))
(magit-run-git-with-editor "commit" args))
t) ; The commit was created; used by below lambda.
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index ff0a5bc..76d3cc6 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -2331,7 +2331,7 @@ section or a child thereof."
(string-prefix-p "a/" orig)
(string-prefix-p "b/" file))
(and (derived-mode-p 'magit-log-mode)
- (--first (string-match-p "\\`-L" it)
+ (--first (string-prefix-p "-L" it)
magit-buffer-log-args)))
(setq file (substring file 2))
(when orig
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 958bddf..cc690ab 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1927,17 +1927,17 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of
(--map (substring it 6) (magit-list-refnames "refs/notes")))
(defun magit-remote-list-tags (remote)
- (--keep (and (not (string-match-p "\\^{}$" it))
+ (--keep (and (not (string-suffix-p "^{}" it))
(substring it 51))
(magit-git-lines "ls-remote" "--tags" remote)))
(defun magit-remote-list-branches (remote)
- (--keep (and (not (string-match-p "\\^{}$" it))
+ (--keep (and (not (string-suffix-p "^{}" it))
(substring it 52))
(magit-git-lines "ls-remote" "--heads" remote)))
(defun magit-remote-list-refs (remote)
- (--keep (and (not (string-match-p "\\^{}$" it))
+ (--keep (and (not (string-suffix-p "^{}" it))
(substring it 41))
(magit-git-lines "ls-remote" remote)))
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 91e1d2d..7896d42 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -361,7 +361,7 @@ the process manually."
;; And CHERRY_PICK_HEAD does not exist when a conflict happens
;; while picking a series of commits with --no-commit.
(when-let ((line (magit-file-line (magit-git-dir "sequencer/todo"))))
- (string-match-p "^pick" line))))
+ (string-prefix-p "pick" line))))
;;; Revert
@@ -417,7 +417,7 @@ without prompting."
;; And REVERT_HEAD does not exist when a conflict happens while
;; reverting a series of commits with --no-commit.
(when-let ((line (magit-file-line (magit-git-dir "sequencer/todo"))))
- (string-match-p "^revert" line))))
+ (string-prefix-p "revert" line))))
;;; Patch