utzig commented on a change in pull request #363: newt upgrade: Fix repo 
conflict error message
URL: https://github.com/apache/mynewt-newt/pull/363#discussion_r366762604
 
 

 ##########
 File path: newt/deprepo/deprepo.go
 ##########
 @@ -236,15 +236,20 @@ func PruneMatrix(m *Matrix, repos RepoMap, rootReqs 
RequirementMap) error {
 // of repos in the project.
 func PruneDepGraph(dg DepGraph, keep []*repo.Repo) {
        for k, _ := range dg {
-               found := false
-               for _, r := range keep {
-                       if r.Name() == k.Name {
-                               found = true
-                               break
+               // The empty string indicates a `project.yml` requirement.  
Always
+               // keep these.
+               if k.Name != "" {
+                       found := false
+
+                       for _, r := range keep {
+                               if k.Name == "" || k.Name == r.Name() {
 
 Review comment:
   If `k.Name != ""` in the test above can it ever be `== ""` here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to