S-45195 Encapsulate assetDetailCommits into a function