Skip to content

Conversation

@cruessler
Copy link
Collaborator

This restores the behaviour of gitui <= 0.27. gitui <= 0.27 uses a different default value for status.showUntrackedFiles than libgit2, gix and git.

pub fn untracked_files_config_repo(
repo: &Repository,
) -> Result<ShowUntrackedFilesConfig> {
let show_untracked_files =
get_config_string_repo(repo, "status.showUntrackedFiles")?;
if let Some(show_untracked_files) = show_untracked_files {
if &show_untracked_files == "no" {
return Ok(ShowUntrackedFilesConfig::No);
} else if &show_untracked_files == "normal" {
return Ok(ShowUntrackedFilesConfig::Normal);
}
}
// This does not reflect how git works according to its docs that say: "If this variable is not
// specified, it defaults to `normal`."
//
// https://git-scm.com/docs/git-config#Documentation/git-config.txt-statusshowUntrackedFiles
//
// Note that this might become less relevant over time as more code gets migrated to `gitoxide`
// because `gitoxide` respects `status.showUntrackedFiles` by default.
Ok(ShowUntrackedFilesConfig::All)
}

This Pull Request fixes #2744.

I followed the checklist:

  • I ran make check without errors
  • I tested the overall application

This restores the behaviour of `gitui` <= 0.27.
@cruessler cruessler requested a review from extrawurst October 28, 2025 14:44
@extrawurst extrawurst merged commit dd47580 into gitui-org:master Oct 28, 2025
22 checks passed
cruessler added a commit to cruessler/gitui that referenced this pull request Oct 29, 2025
This restores the behaviour of `gitui` <= 0.27.
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.

Status Tasb regression: new folders act as file

2 participants