In the checkBranchName function, there is a check if the branchName doesn't end with ".lock". However the check fails for all names with length 4. branchName.lastIndexOf('.lock') != branchName.length - '.lock'.length)