Subject: Re: bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir

From: Eli Zaretskii <[email-masked]>
Date: Fri, 13 Sep 2024 19:10:52 +0300

> Cc: Juri Linkov <[email-masked]>
> Date: Fri, 13 Sep 2024 11:51:47 -0400
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> -     ;; if it's a directory, don't supply any revision default
> -     ((file-directory-p first)
> -      nil)
>       ;; if the file is not up-to-date, use working revision as older revision
> -     ((not (vc-up-to-date-p first))
> -      (setq rev1-default (vc-working-revision first)))
> +     ((not (and (file-directory-p first) (vc-up-to-date-p first)))
> +      (setq rev1-default (vc-working-revision first backend)))

Doesn't this change the conditions under which we use
vc-working-revision for regular files?  Did you perhaps mean

   ((and (not (file-directory-p first)) (vc-up-to-date-p first))

instead?