fix checkout between branches pointing the same commit