杨魅力
我正在使用以下bash函数,例如: git-is-merged develop feature/new-featuregit-is-merged () { merge_destination_branch=$1 merge_source_branch=$2 merge_base=$(git merge-base $merge_destination_branch $merge_source_branch) merge_source_current_commit=$(git rev-parse $merge_source_branch) if [[ $merge_base = $merge_source_current_commit ]] then echo $merge_source_branch is merged into $merge_destination_branch return 0 else echo $merge_source_branch is not merged into $merge_destination_branch return 1 fi}