all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: "Pär Bohrarper" <par.bohrarper@gmail.com>, 71538@debbugs.gnu.org
Subject: bug#71538: 29.3; project-find-file stopped working for files in git submodules
Date: Fri, 14 Jun 2024 04:08:52 +0300	[thread overview]
Message-ID: <52427b8c-95a7-45b9-97b0-ad8af08db87b@gutov.dev> (raw)
In-Reply-To: <CAGRu4SW0Aj99x+GNEAXvGWV5BjnU-xr62F4ZEMRpF1eYjM6sbQ@mail.gmail.com>

Hi!

On 13/06/2024 17:55, Pär Bohrarper wrote:
> Since 
> https://github.com/emacs-mirror/emacs/commit/370b216f08699bdd85b910868642df441c06306c <https://github.com/emacs-mirror/emacs/commit/370b216f08699bdd85b910868642df441c06306c>
> project-find-file will produce a list where files located in a git
> submodule is listed relative to the submodule instead of relative to the
> project root. The problem happens when recursing into submodules if
> project--vc-merge-submodules-p is true.

Thanks for the report.

I managed to fix it locally by
> concating the module name to the file in the recursive call:
> 
>      (let ((sub-files-maybe-relative
>     (project--vc-list-files
>      (concat default-directory module)
>      backend
>      extra-ignores)))
>        (if project-files-relative-names
>    ;; If project--vc-list-files returns relative names, then concat the 
> submodule name
>    (mapcar (lambda (file) (concat (file-name-as-directory module) file)) 
> sub-files-maybe-relative)
>                           sub-files-maybe-relative))
> 
> I don't know if this is the correct approach though.

It's okay, I've pushed your patch to master with minor alterations in 
commit 2dae603c414. Thank you.

Do you install the newer versions of 'project' from ELPA or build Emacs 
from source?





  reply	other threads:[~2024-06-14  1:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 14:55 bug#71538: 29.3; project-find-file stopped working for files in git submodules Pär Bohrarper
2024-06-14  1:08 ` Dmitry Gutov [this message]
2024-06-14  8:01 ` Pär Bohrarper
2024-06-14 15:34   ` Dmitry Gutov
2024-06-17 12:25     ` Pär Bohrarper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52427b8c-95a7-45b9-97b0-ad8af08db87b@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=71538@debbugs.gnu.org \
    --cc=par.bohrarper@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.