You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix panic when search yields repo and file matches in same repo (#385)
This fixes#382 by fixing a regression that was introduced by #361.
When the search queries defined in a campaign spec yielded a repository
match result and file match results in the same repository, in that
order, the code would crash because of an uninitialized map.
The code here fixes it by always initializing the map.
I also added a test that reproduces the behaviour and documents how we
turn multiple search results into a list of repositories.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ All notable changes to `src-cli` are documented in this file.
17
17
18
18
### Fixed
19
19
20
+
- Fix a regression that was introduced by [#361](https://github.com/sourcegraph/src-cli/pull/361) and caused the "Resolving repositories" step of `src campaign [apply|preview]` to crash when the search query in the campaign spec yielded file matches and repository matches from the same repository.
0 commit comments