1. update the condition to judge whether the given branch is the current branch