Please use the same formatting for Promises like jQuery uses, so either
```
return Git.getCurrentBranchName().then(function (oldBranchName) {
```
or
```
return Git.getCurrentBranchName()
    .then(function (oldBranchName) {
```