Maybe it might be a strange need, but I believe it would be helpful to have something like this:
if($branch$ === "master) {
// Special code for the master branch
} else {
// Something special for tests. Like extended logging
}
In SVN this was no problem and I'm aware that GIT don't have a keyword expansion system, anyway, it's still interesting to find a solution for this.