File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : Bug report
3+ about : Report a problem with struct-cli
4+ title : " [BUG] "
5+ labels : bug
6+ assignees : ' '
7+ ---
8+
9+ ** Describe the bug**
10+ A clear and concise description of what the bug is.
11+
12+ ** To Reproduce**
13+ Steps to reproduce the behavior:
14+
15+ ** Current behavior:**
16+ Current behavior which happens.
17+
18+ ** Expected behavior**
19+ What you expected to happen.
20+
21+ ** System details**
22+ - OS:
23+ - Shell:
24+ - struct-cli version:
25+
26+ ** Additional context**
27+ Add any other context or screenshots here.
Original file line number Diff line number Diff line change 1+ blank_issues_enabled : false
2+ contact_links :
3+ - name : Questions & Discussions
4+ url : https://github.com/caffienerd/struct-cli/discussions
5+ about : Please ask and answer questions here.
Original file line number Diff line number Diff line change 1+ ---
2+ name : Feature request
3+ about : Suggest an idea or improvement for struct-cli
4+ title : " [FEATURE] "
5+ labels : enhancement
6+ assignees : ' '
7+ ---
8+
9+ ** Summary**
10+ Briefly describe the feature or improvement you’d like to see.
11+
12+ ** Problem this solves**
13+ Explain what problem or pain point this feature would address.
14+
15+ ** Proposed solution**
16+ Describe how you’d like struct-cli to behave.
17+
18+ ** Alternatives considered**
19+ List any other tools, workarounds, or approaches you’ve tried.
20+
21+ ** Additional context**
22+ Add screenshots, mockups, or examples that help explain the request.
Original file line number Diff line number Diff line change @@ -132,8 +132,17 @@ pub fn display_tree(
132132
133133 // Check git mode
134134 if let Some ( ref git_files) = config. git_files {
135- if !is_dir && !git_files. contains ( & path) {
136- continue ;
135+ if is_dir {
136+ // For directories, check if ANY tracked file is inside this directory
137+ let has_tracked_files = git_files. iter ( ) . any ( |f| f. starts_with ( & path) ) ;
138+ if !has_tracked_files {
139+ continue ; // Skip this directory, no tracked files inside
140+ }
141+ } else {
142+ // For files, check if this specific file is tracked
143+ if !git_files. contains ( & path) {
144+ continue ; // Skip this untracked file
145+ }
137146 }
138147 }
139148
You can’t perform that action at this time.
0 commit comments