Search in all Git branches for specific code

Recently I had to confirm that some particular code went to a release branch. Since we have multiple release branches (up to dozens) I though that doing it by hands it's too complicated. Thankfully there is a git command available which can grep for a specific code in a branch , so I had to pass all branches where I wanted to look for a specific code pattern:

git branch -r | grep release | xargs -P 16 -n 1 -- git grep -i "code_pattern"

where git branch returns all remote tracking branches, then grep release leave only branches I am interested in.
Results of the previous command I iterativly pass to git grep using xargs command, where -P will utilize all available cores and do it in parallel.