JetpackDuba / Gitnuro

A FOSS Git multiplatform client for newbies and pros
https://gitnuro.com/
GNU General Public License v3.0
946 stars 46 forks source link

Submodules don't open on Windows #125

Closed Escain closed 1 year ago

Escain commented 1 year ago

Describe the bug Trying to open a submodule tab on Windows fails.

To Reproduce From the parent repository:

1) Click on the submodule listed under "submodules" in the left column.

Expected: A new tab opens with the submodule. Result: An empty tab opens, exactly as when clicking the "+" button to add a new tab.

From a new empty tab:

1) Click the "+" button to open a new empty tab 2) Click "Open a new repository" 3) Select the submodule folder

Expected: The submodule is open Result: An error is shown. image

Desktop (please complete the following information):

JetpackDuba commented 1 year ago

Hey!

Has the submodule been initialized? It won't work if the directory is empty.

There is a bug in 1.2.1 were you could open a submodule even if it wasn't initialized. It has been fixed but won't be available until 1.3.0

Escain commented 1 year ago

Hi! Yes, it has been initialized. Actually this seems Windows-only, because at home on my Debian, it works fine. I wonder if there is some issue with the back-slash of the path, or something similar.

The submodule .git contains the following path: gitdir: ../.git/modules/Inspiration

And Gitnuro throws as follow:

image

JetpackDuba commented 1 year ago

It's possible that it's mixing something, I'll try it tomorrow on Windows.

Thanks!

JetpackDuba commented 1 year ago

There is an issue when clicking to open a submodule from the side panel. I've fixed it for v1.3.0. You can still open the submodule directly as any other repository.

Escain commented 1 year ago

Hi!

You can still open the submodule directly as any other repository.

How can I do this? when I try to open the submodule as any other repo, it shows the error message above. When testing, I still get "Invalid submodule directory" From my point of view, on Windows, it is impossible to open a submodule.

JetpackDuba commented 1 year ago

Ah true, I did something weird when testing.

As for now, I'd recommend to clone the source and run gradlew.bat run (or however it's done to run a bat on windows, I can't recall how it's done right now).