Bug 771261 - fedpkg switch-branch should work with modified cloning
Summary: fedpkg switch-branch should work with modified cloning
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 16
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-03 02:19 UTC by Philip Prindeville
Modified: 2013-01-10 06:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-03 18:05:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Philip Prindeville 2012-01-03 02:19:05 UTC
Description of problem:

If I start out working (say) in f16 and make some changes, then decide to look at whether those changes are applicable in rawhide or el6, I need to manually do a "git stash" when switching branches... then remember to pop (apply?) them when I return to the previous branch.

Version-Release number of selected component (if applicable):

1.6-1

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jesse Keating 2012-01-03 18:05:39 UTC
This is a limitation of git itself, it won't let you switch branches when you have modified content.

Comment 2 Philip Prindeville 2012-01-03 18:43:53 UTC
(In reply to comment #1)
> This is a limitation of git itself, it won't let you switch branches when you
> have modified content.

Right, but since fedpkg is a script, you can make it do what you want, including stash any changes when switching to an alternate branch, and then restore them when switching back.

If you do the stash before the branch, then it works.

Comment 3 Jesse Keating 2012-01-03 18:53:45 UTC
Dealing with stashes requires a bit more advanced knowledge of how git works, not something I'd want to impose upon people in a default setting.  An option to switch-branch that would cause a stash and re-apply might be useful, but not something I'm going to spend time on at this point.

Comment 4 Philip Prindeville 2012-01-03 19:08:15 UTC
(In reply to comment #3)
> Dealing with stashes requires a bit more advanced knowledge of how git works,
> not something I'd want to impose upon people in a default setting.  An option
> to switch-branch that would cause a stash and re-apply might be useful, but not
> something I'm going to spend time on at this point.

If you did that would be awesome: before filing the bug I took an informal poll on #fedora-devel and there was interest in it.

Comment 5 Jesse Keating 2012-01-03 19:36:59 UTC
Not to send you on a goose chase, but if you file it as an enhancement request at https://fedorahosted.org/rpkg  then maybe somebody else will pick it up before I look at it and submit patches.  Something like this belongs in the core rpkg library.

Comment 6 Philip Prindeville 2012-01-06 18:10:59 UTC
(In reply to comment #5)
> Not to send you on a goose chase, but if you file it as an enhancement request
> at https://fedorahosted.org/rpkg  then maybe somebody else will pick it up
> before I look at it and submit patches.  Something like this belongs in the
> core rpkg library.

Well, I would if I had a trac account on fedorahosted.org but I don't...

Comment 7 Jesse Keating 2012-01-06 22:41:13 UTC
https://fedorahosted.org/rpkg/ticket/8

Comment 8 Philip Prindeville 2012-01-10 18:05:50 UTC
(In reply to comment #7)
> https://fedorahosted.org/rpkg/ticket/8

Awesome, thanks.


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