Subject: bug#63829: 29.0.90; project-find-file's future history breaks with common-parent-directory

From: Juri Linkov <[email-masked]>
Date: Sun, 20 Aug 2023 20:13:51 +0300

> +(defun project--expand-file-name (filename project)
> +  (when-let ((old-root (get-text-property 0 'project filename)))
> +    (abbreviate-file-name
> +     (expand-file-name
> +      (file-relative-name filename old-root)
> +      (project-root project)))))

and

> +      (add-to-history 'file-name-history
> +                      (propertize file 'project (project-root project))))

Then maybe better to simply add only the relative file name for optimization?
Like this

         (add-to-history 'file-name-history
                         (propertize file 'project-relative-name
                          (file-relative-name file (project-root project)))))