Skip to content

Commit

Permalink
NuGetSupport: Set isResolvedRevision if the commit is known
Browse files Browse the repository at this point in the history
The previously introduced `VcsInfo.isResolvedRevision` property allows
to signal that the revision was already resolved. This allows to recover
the logic removed by 835b197 without causing issues with the matching
algorithm used for stored scan results.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@here.com>
  • Loading branch information
mnonnenmacher committed Jun 9, 2021
1 parent 71c603b commit 77ef9e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion analyzer/src/main/kotlin/managers/utils/NuGetSupport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class NuGetSupport(serviceIndexUrls: List<String> = listOf(DEFAULT_SERVICE_INDEX
VcsInfo(
type = VcsType(it.type.orEmpty()),
url = it.url.orEmpty(),
revision = (it.commit ?: it.branch).orEmpty()
revision = (it.commit ?: it.branch).orEmpty(),
isResolvedRevision = it.commit != null
)
} ?: VcsInfo.EMPTY

Expand Down

0 comments on commit 77ef9e0

Please sign in to comment.