]> git.eshelyaron.com Git - emacs.git/commitdiff
vc-git-find-revision: Pass --filters to git-cat-file
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 11 Jul 2025 08:13:47 +0000 (09:13 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:06:43 +0000 (10:06 +0200)
* lisp/vc/vc-git.el (vc-git-find-revision): Pass --filters to
git-cat-file.  Problem reported and fix suggested by Oscar
Fuentes <ofv@wanadoo.es>.

(cherry picked from commit 191109e25e51b986e1029b5a5010ced07507a73a)

lisp/vc/vc-git.el

index 17ba37afcbc73f1c83ddf3772ca282e4194fc2c3..08a3d79b39ec9be5a7323b9b112db079c00857e1 100644 (file)
@@ -1336,10 +1336,8 @@ It is based on `log-edit-mode', and has Git-specific extensions."
            (if (string= fn "")
                (file-relative-name file (vc-git-root default-directory))
              (substring fn 0 -1)))))
-    (vc-git-command
-     buffer 0
-     nil
-     "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))
+    (vc-git-command buffer 0 nil "cat-file" "--filters" "blob"
+                    (concat (or rev "HEAD") ":" fullname))))
 
 (defun vc-git-find-ignore-file (file)
   "Return the git ignore file that controls FILE."