(defun vc-git-working-revision (_file)
"Git-specific version of `vc-working-revision'."
- (let* ((process-file-side-effects nil)
- (commit (vc-git--rev-parse "HEAD" t)))
- (or (vc-git-symbolic-commit commit) commit)))
+ (let (process-file-side-effects)
+ (vc-git--rev-parse "HEAD")))
(defun vc-git--symbolic-ref (file)
(or
;; does not (and cannot) quote.
(vc-git--rev-parse (concat rev "~1"))))
-(defun vc-git--rev-parse (rev &optional short)
+(defun vc-git--rev-parse (rev)
(with-temp-buffer
(and
- (if short
- (vc-git--out-ok "rev-parse" "--short" rev)
- (vc-git--out-ok "rev-parse" rev))
- (string-trim-right
- (buffer-substring-no-properties (point-min) (min (+ (point-min) 40)
- (point-max)))))))
+ (vc-git--out-ok "rev-parse" rev)
+ (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
(defun vc-git-next-revision (file rev)
"Git-specific version of `vc-next-revision'."