Skip to content

broken submodule support: Initializes a fresh git repository at an incorrect path instead of opening the correct one if the godot project is a submodule #335

Open

Description

@ekpyron

Godot version

4.7.2.stable.arch_linux.ed1daf0bf

Godot Git Plugin version

4113e11

System information

Archlinux

Issue description

godot-git-plugin does not work correctly if the godot project it is used in is itself a submodule - it will fail to open the submodule repository and instead initialize a new git repository within the parent repository's .git/ hierarchy.

(The use case is using godot-git-plugin in the demo scene for a godot plugin I'm developing, where the plugin is the main repository and the demo scene is a submodule in it - godot-git-plugin would be helpful here for having less-technical coworkers more easily tweak and extend the demo scene.)

I set a local Qwen3.8 instance on looking into this and fixing it and am attaching its analysis and the patch it produced (effectively, it's just a few lines), in case you find them helpful - the patch looks reasonable to me and seems to indeed solve this issue for me. (Since I'm neither familiar with the library used nor with the internals of godot-git-plugin myself, I won't pursue a PR, though.)

ai_analysis.txt
a9891dbcef.patch

Steps to reproduce

  • Create a git repository
  • add another git repository as submodule
  • in the submodule: create a godot project and install godot-git-plugin
  • observe that the plugin initializes a git repository somewhere in the parent repository's .git/ hierarchy instead of correctly opening the submodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions