Skip to content

Ignore the shared trash directory in the Linux template - #4953

Open
SSuva4 wants to merge 1 commit into
github:mainfrom
SSuva4:linux-shared-trash
Open

SSuva4 wants to merge 1 commit into
github:mainfrom
SSuva4:linux-shared-trash

Conversation

@SSuva4

@SSuva4 SSuva4 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Link to the application or project's homepage

freedesktop.org Trash specification

Reasons for making this change

When a working tree covers the root of a volume, files moved to the shared trash can appear as untracked files. The Linux template already handles the per-user .Trash-$uid layout added in #1362. The shared layout stores files under .Trash/$uid/, which the existing rule misses.

Verified with git check-ignore in a fresh repository. Before the change, .Trash/1000/files/example was visible. With the new rule, Git ignores that path and still ignores .Trash-1000/files/example. A regular file named .Trash and a path under .Trashcan/ remain visible.

Links to documentation supporting these rule changes

The Trash specification describes both top-directory layouts and when each is used.

Merge and Approval Steps

@SSuva4
SSuva4 requested a review from a team as a code owner December 1, 2026 20:18
Copilot AI adaptive review requested due to automatic review settings December 1, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain, and the change is limited to adding the shared .Trash/ ignore pattern while preserving the existing per-user trash rule.

No open issues 🎉

What changed in this PR

Updates the Linux global gitignore template to cover the shared freedesktop.org trash directory layout while preserving the existing per-user trash handling.

Changes:

  • Adds .Trash/ to ignore shared trash contents such as .Trash/1000/files/....
  • Retains the existing .Trash-* rule for per-user trash directories.
File Description
Global/​Linux.gitignore Adds the shared .Trash/ directory ignore pattern alongside the existing Linux trash exclusions.

Review effort: Lite (adaptive)

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.

2 participants