Description of problem: When I executed 'rhpkg switch-branch' inside a dist-git repository, the command fails with message that is too vague: $ rhpkg switch-branch rhel-6.8 Could not execute switch_branch: Could not check out rhel-6.8 One is not able to figure out what is the problem. I had to use directly 'git checkout' to get some meaningful error message. Version-Release number of selected component (if applicable): rhpkg-1.26-1.fc22.noarch How reproducible: always if you have the the proper situation in your repository Steps to Reproduce: 1. branch $(A) contains tracked file $(file) 2. branch $(B) does NOT contain file $(file) 3. switch to branch $(B) 4. touch $(file) 5. switch back to branch $(a) using 'rhpkg switch-branch' Actual results: $ rhpkg switch-branch rhel-6.8 Could not execute switch_branch: Could not check out rhel-6.8 Expected results: some meaningful error message helping me to resolve the issue. Additional info: Git gives such a meaningful error message. $ git checkout rhel-6.8 error: The following untracked working tree files would be overwritten by checkout: bind98-CVE-2015-5722.patch Please move or remove them before you can switch branches. Aborting
Pull-request: https://pagure.io/rpkg/pull-request/21