Skip to content

Fix: files in untracked directories are not shown in git add #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sandr01d
Copy link
Collaborator

@sandr01d sandr01d commented Jul 18, 2025

Check list

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

Description

Thanks @carlfriedrich for your insights provided in #458 (comment). I've implemented this as suggested, including the preview for normal mode, for which I simply used our existing directory view:

Pass the value of git config status.showUntrackedFiles to the git status command we run in _forgitladd, defaulting to all when unset.
Additionally correctly handle directories in forgit_add_preview for the case when status.showUntracked is explicitly set to normal.

You can see the different modes in action here:

Type of change

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

Test environment

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

Fixes #458

Pass the value of git config status.showUntrackedFiles to the git status
command we run in _forgit_add, defaulting to 'all' when unset.
Additionally correctly handle directories in _forgit_add_preview for the
case when status.showUntracked is explicitly set to 'normal'.
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.

Files in untracked directories broken in git add
1 participant