This is an improved version of [1]; I tried to clarify the commit message. CC'ing authors of previous commits mentioned in my commit message. [1] https://public-inbox.org/git/pull.477.git.1574848137.gitgitgadget@xxxxxxxxx/T/#u Alexandr Miloslavskiy (2): parse_branchname_arg(): extract part as new function checkout: don't revert file on ambiguous tracking branches builtin/checkout.c | 71 ++++++++++++++++++++++------------------ t/t2024-checkout-dwim.sh | 28 ++++++++++++++-- 2 files changed, 65 insertions(+), 34 deletions(-) base-commit: 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-504%2FSyntevoAlex%2F%230207(git)_2c_prevent_ambiguous_checkout-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-504/SyntevoAlex/#0207(git)_2c_prevent_ambiguous_checkout-v1 Pull-Request: https://github.com/gitgitgadget/git/pull/504 -- gitgitgadget