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

What should the diff of a submodule show? #101

Closed Escain closed 1 year ago

Escain commented 1 year ago

Describe the bug When selecting a submodule in the File Changed, Staged or Unstaged, the submodule diff is not shown.

In File Changed and Unstaged, it take a while to show, and after, it seems to show the parent repo tree. Nothing that really helps to identify what is the previous submodule index and the updated submodule index.

In Staged, it "tries" forever to show the diff: I see the waiting animation of the blue line moving forever (more than 10min).

When working with submodule, I usually:

  1. Got to the submodule, make the modifications and commit.
  2. Go to the parent repo, check that all works and create a commit with the new submodule index.

Consequently, what I need to see in the submodule diff is:

  1. What was the previous index
  2. What is the current/modified index (hash)
  3. Optionally, where those hashes stands in the tree of the submodule, one compared to the other.

Otherwise, all this submodule new feature seems to work like a charm :-) I am very happy how it turn out.

To Reproduce Steps to reproduce the behavior:

  1. Open a parent repo containing an initialized submodule.
  2. Click on the submodule in the list (left menu)
  3. Make some changes and commit.
  4. Return to the parent repository tab, and click on the submodule under "unstaged".

The diff take some time to show. After, the parent directory tree is shown.

Expected behavior

The diff of submodule should at least show the diff of the index (hashes).

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

JetpackDuba commented 1 year ago

It's not a bug but an "intended behavior", or rather a "I'm not sure what should I do and I don't want to keep delaying the release".

I'd like to do some research before doing any additional improvements to submodules, you can keep track of this in #102

JetpackDuba commented 1 year ago

Fixed on https://github.com/JetpackDuba/Gitnuro/commit/5f2180f1a30e489a5e962c13267b37135e386503 :smile: