From 65718e13a570e164ec52fc28b6e4f8c7abff289a Mon Sep 17 00:00:00 2001 From: Alex Bochannek Date: Fri, 11 Oct 2024 20:32:41 -0700 Subject: [PATCH] vc-src-working-revision: Call string-trim-right on command output * 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index 27f58cb3369..ff19b0f7696 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -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))) ;;; -- 2.39.5