Extend "checkout --track" DWIM to support more cases