Skip to content

Conversation

@sandr01d
Copy link
Collaborator

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have added unit tests for my code
  • I have made corresponding changes to the documentation

Description

We currently show the directory preview in forgit add when selecting any directory, including submodules. For submodules the directory preview is not very helpful. This PR ensures that we show the regular preview (git diff) instead, which shows the modified hash of the submodule and whether or not the submodule is dirty (contains uncomitted changes).

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Test
  • Documentation change

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

@sandr01d sandr01d self-assigned this Dec 18, 2025
@sandr01d sandr01d force-pushed the fix-submodule-add-preview branch 4 times, most recently from 5d79510 to a89ecef Compare December 18, 2025 14:22
@sandr01d sandr01d changed the title Fix: Add preview shows dir view when previewing submodules fix: Add preview shows dir view when previewing submodules Dec 18, 2025
@sandr01d sandr01d changed the title fix: Add preview shows dir view when previewing submodules fix: forgit add shows dir view for submodules Dec 18, 2025
Copy link
Collaborator

@carlfriedrich carlfriedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Thanks for the fix and thumbs up for the well implemented integration test!

@sandr01d
Copy link
Collaborator Author

I'll keep this one open until #485 is merged, so I can implement the same solution in the new integration tests here.

@sandr01d sandr01d force-pushed the fix-submodule-add-preview branch from a89ecef to 7dc1b14 Compare December 21, 2025 19:24
@sandr01d sandr01d merged commit 151d61d into wfxr:main Dec 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants