Skip to content

Commit ec82e7c

Browse files
committed
Make stash filtering work when filtering on a folder
1 parent 09cbaf2 commit ec82e7c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pkg/commands/git_commands/stash_loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ outer:
5656
currentStashEntry = stashEntryFromLine(match[2], idx)
5757
for i+1 < len(lines) && !isAStash(lines[i+1]) {
5858
i++
59-
if lines[i] == filterPath {
59+
if strings.HasPrefix(lines[i], filterPath) {
6060
stashEntries = append(stashEntries, currentStashEntry)
6161
continue outer
6262
}

pkg/integration/tests/stash/filter_by_path.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,8 @@ var FilterByPath = NewIntegrationTest(NewIntegrationTestArgs{
5353
filterBy("subdir")
5454

5555
t.Views().Stash().
56-
/* EXPECTED:
5756
Lines(
5857
Contains("subdir/file2"),
5958
)
60-
ACTUAL: */
61-
IsEmpty()
6259
},
6360
})

0 commit comments

Comments
 (0)