Add 'tree:' prefix and substring for the commit id.