How to get the status of whether Git can be fast forward merge by scripting

Gitlab has an option to select fast forward merge in its merge request. After that, merge request that does not meet this requirement cannot be merged. Now I want to check whether one branch can be fast forward merge to another branch, by script. How can I detect this state?

Git
Mar.04,2021

try it with dry run

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea98c2-469e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea98c2-469e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?