# git_ui: Add collapse_untracked_diff settings to improve usability for untracked files \(\#32591\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/0ed6b4ef1ae9f217b9e058f6956d31e7240b6692)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 0ed6b4ef1ae9f217b9e058f6956d31e7240b6692

Requested commit: 0ed6b4ef1ae9f217b9e058f6956d31e7240b6692

Commit: 0ed6b4ef1ae9f217b9e058f6956d31e7240b6692

Tree: 0b6943cd1810b612ba4dd8f85608df0d4984016e

Author: Arseny Kapoulkine

Committer: GitHub

## Message

```
git_ui: Add collapse_untracked_diff settings to improve usability for untracked files (#32591)

In repositories with untracked files that are not intended to be added,
showing the expanded diffs in the panel is confusing, as it places the
changes side by side with changes in tracked files.

This change adds a setting, collapse_untracked_diff, that can be enabled
to collapse untracked diffs by default when the panel is opened.

See
https://github.com/zed-industries/zed/pull/31855#issuecomment-2957547018
(and previous comment for examples of why this is useful).

Example before this change, or with the setting in its default state:


![image](https://github.com/user-attachments/assets/f974c849-7ebf-424e-9397-442a6cc2513b)

Example after this change with the setting set to `true`:


![image](https://github.com/user-attachments/assets/bd8934f5-bd9a-4f5a-b723-cd4b798d2c2c)

Release Notes:

- Git: Added `collapse_untracked_diff` setting to auto-collapse
untracked diffs
```

## Parents

- [d75e210e73909616b9c57713529305b6448621ad](https://git.cafe/gitcafe/zed/commit/d75e210e73909616b9c57713529305b6448621ad?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/0ed6b4ef1ae9f217b9e058f6956d31e7240b6692?format=markdown)
