Bug 1261397 - Failing 'rhpkg switch-branch' gives too little information
Failing 'rhpkg switch-branch' gives too little information
Product: Fedora
Classification: Fedora
Component: rpkg (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Ales Raszka
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-09-09 04:56 EDT by Tomáš Hozza
Modified: 2016-02-22 08:19 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-22 08:19:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomáš Hozza 2015-09-09 04:56:51 EDT
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):

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:
Please move or remove them before you can switch branches.
Comment 1 Ales Raszka 2015-10-05 05:22:19 EDT
Pull-request: https://pagure.io/rpkg/pull-request/21

Note You need to log in before you can comment on or make changes to this bug.