]> git.eshelyaron.com Git - emacs.git/commitdiff
vc-src-working-revision: Call string-trim-right on command output
authorAlex Bochannek <alex@bochannek.com>
Sat, 12 Oct 2024 03:32:41 +0000 (20:32 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 14 Oct 2024 17:40:01 +0000 (19:40 +0200)
* lisp/vc/vc-src.el (vc-src-working-revision): Call string-trim-right on
command output (bug#73763).

(cherry picked from commit f36d059cded88b0b6dafcc4a21a478ef0aaacf81)

lisp/vc/vc-src.el

index 27f58cb3369144e47837daa82fbf28863ae5ee1b..ff19b0f769650cc5d7c1b79bf139b5f0bd0979fc 100644 (file)
@@ -222,8 +222,9 @@ This function differs from `vc-do-command' in that it invokes `vc-src-program'."
 (defun vc-src-working-revision (file)
   "SRC-specific version of `vc-working-revision'."
   (let ((result (ignore-errors
-                 (with-output-to-string
-                   (vc-src-command standard-output file "list" "-f{1}" "@")))))
+                  (string-trim-right
+                   (with-output-to-string
+                     (vc-src-command standard-output file "list" "-f{1}" "@"))))))
     (if (zerop (length result)) "0" result)))
 
 ;;;