コマンドでファストフォワード可能か判定する

下記コマンドの終了コードでfeatureブランチがmasterブランチにfast-forwardでマージできるか判定できる。

git merge-base --is-ancestor master feature