* git rebase --skip @ 2007-11-07 22:21 Mike Hommey 2007-11-07 22:48 ` Johannes Schindelin ` (2 more replies) 0 siblings, 3 replies; 20+ messages in thread From: Mike Hommey @ 2007-11-07 22:21 UTC (permalink / raw) To: git Hi, I use git-rebase quite regularly, and I haven't used git-rebase --skip after a failed merge without first resetting the working tree. I was wondering if it wouldn't make sense to automatically do the reset when running git-rebase --skip. Mike ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-07 22:21 git rebase --skip Mike Hommey @ 2007-11-07 22:48 ` Johannes Schindelin 2007-11-08 3:23 ` Jeff King 2007-11-08 7:03 ` [PATCH] Do git reset --hard HEAD when using " Mike Hommey 2 siblings, 0 replies; 20+ messages in thread From: Johannes Schindelin @ 2007-11-07 22:48 UTC (permalink / raw) To: Mike Hommey; +Cc: git Hi, On Wed, 7 Nov 2007, Mike Hommey wrote: > I use git-rebase quite regularly, and I haven't used git-rebase --skip > after a failed merge without first resetting the working tree. I was > wondering if it wouldn't make sense to automatically do the reset when > running git-rebase --skip. Makes sense to me. The user is already required to pass "--skip" to say "scrap this patch". FWIW --interactive already has this behaviour since it was added to "official" git. Ciao, Dscho ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-07 22:21 git rebase --skip Mike Hommey 2007-11-07 22:48 ` Johannes Schindelin @ 2007-11-08 3:23 ` Jeff King 2007-11-08 3:31 ` Jakub Narebski 2007-11-08 10:24 ` Björn Steinbrink 2007-11-08 7:03 ` [PATCH] Do git reset --hard HEAD when using " Mike Hommey 2 siblings, 2 replies; 20+ messages in thread From: Jeff King @ 2007-11-08 3:23 UTC (permalink / raw) To: Mike Hommey; +Cc: git On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: > I use git-rebase quite regularly, and I haven't used git-rebase --skip > after a failed merge without first resetting the working tree. I was > wondering if it wouldn't make sense to automatically do the reset when > running git-rebase --skip. I have often been annoyed by this behavior, too, and I can't think of any situation where you _wouldn't_ want the reset to happen. But I would be more comfortable hearing confirmation from others that they can't think of such a situation. -Peff ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 3:23 ` Jeff King @ 2007-11-08 3:31 ` Jakub Narebski 2007-11-08 10:24 ` Björn Steinbrink 1 sibling, 0 replies; 20+ messages in thread From: Jakub Narebski @ 2007-11-08 3:31 UTC (permalink / raw) To: git Jeff King wrote: > On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: > >> I use git-rebase quite regularly, and I haven't used git-rebase --skip >> after a failed merge without first resetting the working tree. I was >> wondering if it wouldn't make sense to automatically do the reset when >> running git-rebase --skip. > > I have often been annoyed by this behavior, too, and I can't think of > any situation where you _wouldn't_ want the reset to happen. But I > would be more comfortable hearing confirmation from others that they > can't think of such a situation. Perhaps "git rebase --force-skip" or "git rebase --force --skip" would be the way to fo above... -- Jakub Narebski Warsaw, Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 3:23 ` Jeff King 2007-11-08 3:31 ` Jakub Narebski @ 2007-11-08 10:24 ` Björn Steinbrink 2007-11-08 10:32 ` Andreas Ericsson 2007-11-08 18:43 ` Daniel Barkalow 1 sibling, 2 replies; 20+ messages in thread From: Björn Steinbrink @ 2007-11-08 10:24 UTC (permalink / raw) To: Jeff King; +Cc: Mike Hommey, git On 2007.11.07 22:23:10 -0500, Jeff King wrote: > On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: > > > I use git-rebase quite regularly, and I haven't used git-rebase --skip > > after a failed merge without first resetting the working tree. I was > > wondering if it wouldn't make sense to automatically do the reset when > > running git-rebase --skip. > > I have often been annoyed by this behavior, too, and I can't think of > any situation where you _wouldn't_ want the reset to happen. But I > would be more comfortable hearing confirmation from others that they > can't think of such a situation. Let's take this history: C---D---E topic / A---B master You then do: git rebase master topic Now D causes conflicts, because B did a similar change, but not quite the same, maybe having a bug. So you want to keep parts of D, but it's no longer the same commit semantically and the original commit message would be bogus. So you resolve the conflicts and do: git commit git rebase --skip Because you replaced D with a new different commit, instead of really just rebasing it. With plain --continue, you'd have to go back and fix the commit message once the rebase is complete. And --continue after the commit is a no-go, too, because rebase will complain that there's nothing left to produce the rebased D commit. And now imagine that you forget to commit but instead just --skip. Ouch, all the work is lost, time to restart the rebase. With the current behaviour, rebase won't just throw away your stuff. Björn ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 10:24 ` Björn Steinbrink @ 2007-11-08 10:32 ` Andreas Ericsson 2007-11-08 10:44 ` Björn Steinbrink 2007-11-08 18:43 ` Daniel Barkalow 1 sibling, 1 reply; 20+ messages in thread From: Andreas Ericsson @ 2007-11-08 10:32 UTC (permalink / raw) To: Björn Steinbrink; +Cc: Jeff King, Mike Hommey, git Björn Steinbrink wrote: > On 2007.11.07 22:23:10 -0500, Jeff King wrote: >> On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: >> >>> I use git-rebase quite regularly, and I haven't used git-rebase --skip >>> after a failed merge without first resetting the working tree. I was >>> wondering if it wouldn't make sense to automatically do the reset when >>> running git-rebase --skip. >> I have often been annoyed by this behavior, too, and I can't think of >> any situation where you _wouldn't_ want the reset to happen. But I >> would be more comfortable hearing confirmation from others that they >> can't think of such a situation. > > Let's take this history: > > C---D---E topic > / > A---B master > > You then do: > git rebase master topic > > Now D causes conflicts, because B did a similar change, but not quite > the same, maybe having a bug. So you want to keep parts of D, but it's > no longer the same commit semantically and the original commit message > would be bogus. So you resolve the conflicts and do: > > git commit > git rebase --skip > > Because you replaced D with a new different commit, instead of really > just rebasing it. With plain --continue, you'd have to go back and fix > the commit message once the rebase is complete. And --continue after the > commit is a no-go, too, because rebase will complain that there's > nothing left to produce the rebased D commit. > > And now imagine that you forget to commit but instead just --skip. > Ouch, all the work is lost, time to restart the rebase. With the current > behaviour, rebase won't just throw away your stuff. > How about if the state to skip was stashed, the patch reapplied and the differences compared. If they were identical, go ahead and force the reset --hard, otherwise abort. That way, --skip will dwim only when it's safe, and all the lost work can be automagically created by just re-applying the patch again? -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 10:32 ` Andreas Ericsson @ 2007-11-08 10:44 ` Björn Steinbrink 2007-11-08 23:16 ` Jeff King 0 siblings, 1 reply; 20+ messages in thread From: Björn Steinbrink @ 2007-11-08 10:44 UTC (permalink / raw) To: Andreas Ericsson; +Cc: Jeff King, Mike Hommey, git On 2007.11.08 11:32:08 +0100, Andreas Ericsson wrote: > Björn Steinbrink wrote: >> On 2007.11.07 22:23:10 -0500, Jeff King wrote: >>> On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: >>> >>>> I use git-rebase quite regularly, and I haven't used git-rebase --skip >>>> after a failed merge without first resetting the working tree. I was >>>> wondering if it wouldn't make sense to automatically do the reset when >>>> running git-rebase --skip. >>> I have often been annoyed by this behavior, too, and I can't think of >>> any situation where you _wouldn't_ want the reset to happen. But I >>> would be more comfortable hearing confirmation from others that they >>> can't think of such a situation. >> >> Let's take this history: >> >> C---D---E topic >> / >> A---B master >> >> You then do: >> git rebase master topic >> >> Now D causes conflicts, because B did a similar change, but not quite >> the same, maybe having a bug. So you want to keep parts of D, but it's >> no longer the same commit semantically and the original commit message >> would be bogus. So you resolve the conflicts and do: >> >> git commit >> git rebase --skip >> >> Because you replaced D with a new different commit, instead of really >> just rebasing it. With plain --continue, you'd have to go back and fix >> the commit message once the rebase is complete. And --continue after the >> commit is a no-go, too, because rebase will complain that there's >> nothing left to produce the rebased D commit. >> >> And now imagine that you forget to commit but instead just --skip. >> Ouch, all the work is lost, time to restart the rebase. With the current >> behaviour, rebase won't just throw away your stuff. >> > > How about if the state to skip was stashed, the patch reapplied and the > differences compared. If they were identical, go ahead and force the > reset --hard, otherwise abort. That way, --skip will dwim only when > it's safe, and all the lost work can be automagically created by > just re-applying the patch again? I'd prefer the --force option suggested in some other mail. Maybe I'm just not manly enough, but messing up a rebase can mean lots of duplicated work, so I'm rather happy with no dwim at all. Maybe for the real manly users out there, add a rebase.alwaysForce option so they can laugh at me for not using that ;-) Björn ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 10:44 ` Björn Steinbrink @ 2007-11-08 23:16 ` Jeff King 2007-11-08 23:52 ` Junio C Hamano 0 siblings, 1 reply; 20+ messages in thread From: Jeff King @ 2007-11-08 23:16 UTC (permalink / raw) To: Björn Steinbrink; +Cc: Andreas Ericsson, Mike Hommey, git On Thu, Nov 08, 2007 at 11:44:03AM +0100, Björn Steinbrink wrote: > > How about if the state to skip was stashed, the patch reapplied and the > > differences compared. If they were identical, go ahead and force the > > reset --hard, otherwise abort. That way, --skip will dwim only when > > it's safe, and all the lost work can be automagically created by > > just re-applying the patch again? > > I'd prefer the --force option suggested in some other mail. Maybe I'm > just not manly enough, but messing up a rebase can mean lots of > duplicated work, so I'm rather happy with no dwim at all. Maybe for the > real manly users out there, add a rebase.alwaysForce option so they can > laugh at me for not using that ;-) Personally, I don't see the point of a --force option; it turns your work flow from: 1. git-rebase --skip 2. Oops, I guess I have to reset. 3. git-reset --hard; git-rebase --skip to: 1. same as above 2. same as above 3. git-rebase --force --skip I guess it's a little bit easier to explain to new users, but it in no way eliminates the annoyance of "I expected this to work, and it didn't, so now I have to think about what happened and enter another command." AIUI, Andreas's proposal is not so much DWIM as "do the obvious thing, but include a safety valve to prevent throwing away work." Is there actually a case where it would not have the desired effect? -Peff ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 23:16 ` Jeff King @ 2007-11-08 23:52 ` Junio C Hamano 2007-11-09 1:09 ` Björn Steinbrink 2007-11-09 3:22 ` Jeff King 0 siblings, 2 replies; 20+ messages in thread From: Junio C Hamano @ 2007-11-08 23:52 UTC (permalink / raw) To: Jeff King; +Cc: Björn Steinbrink, Andreas Ericsson, Mike Hommey, git Jeff King <peff@peff.net> writes: > Personally, I don't see the point of a --force option; it turns your work > flow from: > > 1. git-rebase --skip > 2. Oops, I guess I have to reset. > 3. git-reset --hard; git-rebase --skip > > to: > > 1. same as above > 2. same as above > 3. git-rebase --force --skip I do not see it as improvement, either, for the same reason you state. > AIUI, Andreas's proposal is not so much DWIM as "do the obvious thing, > but include a safety valve to prevent throwing away work." Is there > actually a case where it would not have the desired effect? The user is explicitly saying --skip, so I do not think it is dangerous even if we unconditionally did "reset --hard" at that point. Or we could introduce a new option "--drop" (that's "drop the current commit and continue") to do so, if people find that the word "skip" does not sound like a scary destructive operation. But I do not think that is needed. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 23:52 ` Junio C Hamano @ 2007-11-09 1:09 ` Björn Steinbrink 2007-11-09 3:22 ` Jeff King 1 sibling, 0 replies; 20+ messages in thread From: Björn Steinbrink @ 2007-11-09 1:09 UTC (permalink / raw) To: Junio C Hamano; +Cc: Jeff King, Andreas Ericsson, Mike Hommey, git On 2007.11.08 15:52:08 -0800, Junio C Hamano wrote: > Jeff King <peff@peff.net> writes: > > > Personally, I don't see the point of a --force option; it turns your work > > flow from: > > > > 1. git-rebase --skip > > 2. Oops, I guess I have to reset. > > 3. git-reset --hard; git-rebase --skip > > > > to: > > > > 1. same as above > > 2. same as above > > 3. git-rebase --force --skip > > I do not see it as improvement, either, for the same reason you > state. > > > AIUI, Andreas's proposal is not so much DWIM as "do the obvious thing, > > but include a safety valve to prevent throwing away work." Is there > > actually a case where it would not have the desired effect? > > The user is explicitly saying --skip, so I do not think it is > dangerous even if we unconditionally did "reset --hard" at that > point. The user _must_ say --skip in the case I outlined. And I'm pretty sure that the first thing I'll (accidently) do once --skip implies "reset --hard" is to forget to commit. Murphy has never let me down. How about adding that --amend option that someone mentioned? Or even just letting --continue act like --skip when there's nothing to commit. That way, you're no longer forced to use --skip. Björn ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 23:52 ` Junio C Hamano 2007-11-09 1:09 ` Björn Steinbrink @ 2007-11-09 3:22 ` Jeff King 2007-11-09 10:59 ` Johannes Schindelin 1 sibling, 1 reply; 20+ messages in thread From: Jeff King @ 2007-11-09 3:22 UTC (permalink / raw) To: Junio C Hamano; +Cc: Björn Steinbrink, Andreas Ericsson, Mike Hommey, git On Thu, Nov 08, 2007 at 03:52:08PM -0800, Junio C Hamano wrote: > The user is explicitly saying --skip, so I do not think it is > dangerous even if we unconditionally did "reset --hard" at that > point. Sure, I think the complaint is not that "reset --hard" is the wrong behavior, but that people are prone to type --skip in error. Right now we handle that error in a data-preserving way (we complain, and the user has to think and issue a "throw away this data" command), but automatic reset is less safe (even though there are fewer times when somebody meant to commit instead of just reset, the consequences are harder to recover from). I've never personally run into this, but I think it is a reasonable thing to think about, and if it is easy to add an additional safety valve (either stashing the index/wt state, or checking before automatic "reset --hard" whether any work has been done towards resolving), then we probably should. So I am fine with the original patch (unconditional reset --hard), but it would be nice to see the people who care submit concrete proposals for such a safety valve. > Or we could introduce a new option "--drop" (that's "drop the > current commit and continue") to do so, if people find that the > word "skip" does not sound like a scary destructive operation. I don't think the problem is "users don't realize how scary --skip can be", but rather "I use --skip to resolve this situation 99% of the time, so in the other 1%, I soetimes use it accidentally." -Peff ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-09 3:22 ` Jeff King @ 2007-11-09 10:59 ` Johannes Schindelin 2007-11-09 16:19 ` J. Bruce Fields 2007-11-09 17:20 ` Jeff King 0 siblings, 2 replies; 20+ messages in thread From: Johannes Schindelin @ 2007-11-09 10:59 UTC (permalink / raw) To: Jeff King Cc: Junio C Hamano, Björn Steinbrink, Andreas Ericsson, Mike Hommey, git Hi, On Thu, 8 Nov 2007, Jeff King wrote: > So I am fine with the original patch (unconditional reset --hard), but > it would be nice to see the people who care submit concrete proposals > for such a safety valve. Isn't having to say "--skip" instead of "--continue" enough? Some people might complain that it's too easy to get your fingers wired to type --skip. In that case, I might beg to differ for two reasons: --skip is definitely not the default operation, so the fingers do not get any chance to do that, and even if, they would get wired to --force --skip just as easily. Besides, after my patch to rebase on a detached HEAD, it is very easy to go back to the original state and try again. Ciao, Dscho ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-09 10:59 ` Johannes Schindelin @ 2007-11-09 16:19 ` J. Bruce Fields 2007-11-09 16:26 ` J. Bruce Fields 2007-11-09 17:20 ` Jeff King 1 sibling, 1 reply; 20+ messages in thread From: J. Bruce Fields @ 2007-11-09 16:19 UTC (permalink / raw) To: Johannes Schindelin Cc: Jeff King, Junio C Hamano, Björn Steinbrink, Andreas Ericsson, Mike Hommey, git On Fri, Nov 09, 2007 at 10:59:57AM +0000, Johannes Schindelin wrote: > Hi, > > On Thu, 8 Nov 2007, Jeff King wrote: > > > So I am fine with the original patch (unconditional reset --hard), but > > it would be nice to see the people who care submit concrete proposals > > for such a safety valve. > > Isn't having to say "--skip" instead of "--continue" enough? Some people > might complain that it's too easy to get your fingers wired to type > --skip. > > In that case, I might beg to differ for two reasons: --skip is definitely > not the default operation, so the fingers do not get any chance to do > that, and even if, they would get wired to --force --skip just as easily. > > Besides, after my patch to rebase on a detached HEAD, it is very easy to > go back to the original state and try again. We can't make --skip do an automatic reset --hard. I expect --skip to tell me if I haven't finished resolving conflicts. If it doesn't do that, I'll lose work. I can't be the only user with that expectation. (To be more specific: the work I lose is the work spent resolving how however many conflicts I've dealt with so far. It isn't always the case that I get to a certain point in a rebase and say "ah, yes, I know this is already applied, I can reset and skip it." More often I want to go through each conflict and decide individually. So I do that for a few, I run --continue or --skip when I think I'm done (but don't actually check first, 'cause I count on rebase to do that), then fix up anything remaining.) --b. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-09 16:19 ` J. Bruce Fields @ 2007-11-09 16:26 ` J. Bruce Fields 0 siblings, 0 replies; 20+ messages in thread From: J. Bruce Fields @ 2007-11-09 16:26 UTC (permalink / raw) To: Johannes Schindelin Cc: Jeff King, Junio C Hamano, Björn Steinbrink, Andreas Ericsson, Mike Hommey, git On Fri, Nov 09, 2007 at 11:19:46AM -0500, J. Bruce Fields wrote: > On Fri, Nov 09, 2007 at 10:59:57AM +0000, Johannes Schindelin wrote: > > Hi, > > > > On Thu, 8 Nov 2007, Jeff King wrote: > > > > > So I am fine with the original patch (unconditional reset --hard), but > > > it would be nice to see the people who care submit concrete proposals > > > for such a safety valve. > > > > Isn't having to say "--skip" instead of "--continue" enough? Some people > > might complain that it's too easy to get your fingers wired to type > > --skip. > > > > In that case, I might beg to differ for two reasons: --skip is definitely > > not the default operation, so the fingers do not get any chance to do > > that, and even if, they would get wired to --force --skip just as easily. > > > > Besides, after my patch to rebase on a detached HEAD, it is very easy to > > go back to the original state and try again. > > We can't make --skip do an automatic reset --hard. I expect --skip to > tell me if I haven't finished resolving conflicts. If it doesn't do > that, I'll lose work. I can't be the only user with that expectation. > > (To be more specific: the work I lose is the work spent resolving how > however many conflicts I've dealt with so far. It isn't always the case > that I get to a certain point in a rebase and say "ah, yes, I know this > is already applied, I can reset and skip it." More often I want to go > through each conflict and decide individually. So I do that for a few, > I run --continue or --skip when I think I'm done (but don't actually > check first, 'cause I count on rebase to do that), then fix up anything > remaining.) (Eh, now that I think of it: what I actually usually do is run --continue, git says there's one more conflict, I fix that up and run --continue again, it tells me there's nothing to commit, I say huh? Then eventually I remember I need to run --skip instead, cursing it for not just figuring that out on its own.... So actually it may be that the only time I run --skip is after --continue has told me I need to. I can't *swear* that that's the case, so I'm still nervous about the idea of --skip automatically resetting. Oh well. Take that one user's experience for what it's worth.) --b. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-09 10:59 ` Johannes Schindelin 2007-11-09 16:19 ` J. Bruce Fields @ 2007-11-09 17:20 ` Jeff King 1 sibling, 0 replies; 20+ messages in thread From: Jeff King @ 2007-11-09 17:20 UTC (permalink / raw) To: Johannes Schindelin Cc: Junio C Hamano, Björn Steinbrink, Andreas Ericsson, Mike Hommey, git On Fri, Nov 09, 2007 at 10:59:57AM +0000, Johannes Schindelin wrote: > Isn't having to say "--skip" instead of "--continue" enough? Some people > might complain that it's too easy to get your fingers wired to type > --skip. They already have. > Besides, after my patch to rebase on a detached HEAD, it is very easy to > go back to the original state and try again. But you are losing any work you did in resolving merges. But I don't personally have this problem, so I will stop defending those who claim to, and let them speak for themselves (hopefully with patches!). -Peff ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 10:24 ` Björn Steinbrink 2007-11-08 10:32 ` Andreas Ericsson @ 2007-11-08 18:43 ` Daniel Barkalow 2007-11-08 19:16 ` Mike Hommey 1 sibling, 1 reply; 20+ messages in thread From: Daniel Barkalow @ 2007-11-08 18:43 UTC (permalink / raw) To: Björn Steinbrink; +Cc: Jeff King, Mike Hommey, git [-- Attachment #1: Type: TEXT/PLAIN, Size: 1662 bytes --] On Thu, 8 Nov 2007, Björn Steinbrink wrote: > On 2007.11.07 22:23:10 -0500, Jeff King wrote: > > On Wed, Nov 07, 2007 at 11:21:05PM +0100, Mike Hommey wrote: > > > > > I use git-rebase quite regularly, and I haven't used git-rebase --skip > > > after a failed merge without first resetting the working tree. I was > > > wondering if it wouldn't make sense to automatically do the reset when > > > running git-rebase --skip. > > > > I have often been annoyed by this behavior, too, and I can't think of > > any situation where you _wouldn't_ want the reset to happen. But I > > would be more comfortable hearing confirmation from others that they > > can't think of such a situation. > > Let's take this history: > > C---D---E topic > / > A---B master > > You then do: > git rebase master topic > > Now D causes conflicts, because B did a similar change, but not quite > the same, maybe having a bug. So you want to keep parts of D, but it's > no longer the same commit semantically and the original commit message > would be bogus. So you resolve the conflicts and do: > > git commit > git rebase --skip I guess that works, and nothing else presently does. But I don't think that's at all intuitive as the correct thing to do (plus it feels too easy to get into losing your commit message). Maybe we should have a "git rebase --amend", which does the obvious thing (acts like --continue, but lets you edit the message). It's not like you just did something totally different; the commit is still the replacement for D, it's just less the same. -Daniel *This .sig left intentionally blank* ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 18:43 ` Daniel Barkalow @ 2007-11-08 19:16 ` Mike Hommey 2007-11-08 19:22 ` Mike Hommey 2007-11-08 23:01 ` Johannes Schindelin 0 siblings, 2 replies; 20+ messages in thread From: Mike Hommey @ 2007-11-08 19:16 UTC (permalink / raw) To: Daniel Barkalow; +Cc: Björn Steinbrink, Jeff King, git On Thu, Nov 08, 2007 at 01:43:05PM -0500, Daniel Barkalow wrote: > > git commit > > git rebase --skip > > I guess that works, and nothing else presently does. But I don't think > that's at all intuitive as the correct thing to do (plus it feels too easy > to get into losing your commit message). Maybe we should have a "git > rebase --amend", which does the obvious thing (acts like --continue, but > lets you edit the message). It's not like you just did something totally > different; the commit is still the replacement for D, it's just less the > same. Maybe some commands such as commit should fail or at least emit warning when used during a rebase ? Mike ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 19:16 ` Mike Hommey @ 2007-11-08 19:22 ` Mike Hommey 2007-11-08 23:01 ` Johannes Schindelin 1 sibling, 0 replies; 20+ messages in thread From: Mike Hommey @ 2007-11-08 19:22 UTC (permalink / raw) To: Daniel Barkalow; +Cc: Björn Steinbrink, Jeff King, git On Thu, Nov 08, 2007 at 08:16:01PM +0100, Mike Hommey wrote: > On Thu, Nov 08, 2007 at 01:43:05PM -0500, Daniel Barkalow wrote: > > > git commit > > > git rebase --skip > > > > I guess that works, and nothing else presently does. But I don't think > > that's at all intuitive as the correct thing to do (plus it feels too easy > > to get into losing your commit message). Maybe we should have a "git > > rebase --amend", which does the obvious thing (acts like --continue, but > > lets you edit the message). It's not like you just did something totally > > different; the commit is still the replacement for D, it's just less the > > same. > > Maybe some commands such as commit should fail or at least emit warning > when used during a rebase ? Or, in the present case, doing the same as what "edit" would do in a git-rebase --interactive could be enough. Mike ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git rebase --skip 2007-11-08 19:16 ` Mike Hommey 2007-11-08 19:22 ` Mike Hommey @ 2007-11-08 23:01 ` Johannes Schindelin 1 sibling, 0 replies; 20+ messages in thread From: Johannes Schindelin @ 2007-11-08 23:01 UTC (permalink / raw) To: Mike Hommey; +Cc: Daniel Barkalow, Björn Steinbrink, Jeff King, git Hi, On Thu, 8 Nov 2007, Mike Hommey wrote: > Maybe some commands such as commit should fail or at least emit warning > when used during a rebase ? No, that would disrupt comming (and valid!) workflow too much. Even a warning. Ciao, Dscho ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH] Do git reset --hard HEAD when using git rebase --skip 2007-11-07 22:21 git rebase --skip Mike Hommey 2007-11-07 22:48 ` Johannes Schindelin 2007-11-08 3:23 ` Jeff King @ 2007-11-08 7:03 ` Mike Hommey 2 siblings, 0 replies; 20+ messages in thread From: Mike Hommey @ 2007-11-08 7:03 UTC (permalink / raw) To: git; +Cc: gitster When you have a merge conflict and want to bypass the commit causing it, you don't want to care about the dirty state of the working tree. Also, don't git reset --hard HEAD in the rebase-skip test, so that the lack of support for this is detected. Signed-off-by: Mike Hommey <mh@glandium.org> --- git-rebase.sh | 1 + t/t3403-rebase-skip.sh | 2 -- 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/git-rebase.sh b/git-rebase.sh index e3ad7de..8814be9 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -158,6 +158,7 @@ do exit ;; --skip) + git reset --hard HEAD || exit $? if test -d "$dotest" then git rerere clear diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh index eab053c..becabfc 100755 --- a/t/t3403-rebase-skip.sh +++ b/t/t3403-rebase-skip.sh @@ -36,7 +36,6 @@ test_expect_failure 'rebase with git am -3 (default)' ' ' test_expect_success 'rebase --skip with am -3' ' - git reset --hard HEAD && git rebase --skip ' test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge' @@ -44,7 +43,6 @@ test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge' test_expect_failure 'rebase with --merge' 'git rebase --merge master' test_expect_success 'rebase --skip with --merge' ' - git reset --hard HEAD && git rebase --skip ' -- 1.5.3.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2007-11-09 17:20 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-11-07 22:21 git rebase --skip Mike Hommey 2007-11-07 22:48 ` Johannes Schindelin 2007-11-08 3:23 ` Jeff King 2007-11-08 3:31 ` Jakub Narebski 2007-11-08 10:24 ` Björn Steinbrink 2007-11-08 10:32 ` Andreas Ericsson 2007-11-08 10:44 ` Björn Steinbrink 2007-11-08 23:16 ` Jeff King 2007-11-08 23:52 ` Junio C Hamano 2007-11-09 1:09 ` Björn Steinbrink 2007-11-09 3:22 ` Jeff King 2007-11-09 10:59 ` Johannes Schindelin 2007-11-09 16:19 ` J. Bruce Fields 2007-11-09 16:26 ` J. Bruce Fields 2007-11-09 17:20 ` Jeff King 2007-11-08 18:43 ` Daniel Barkalow 2007-11-08 19:16 ` Mike Hommey 2007-11-08 19:22 ` Mike Hommey 2007-11-08 23:01 ` Johannes Schindelin 2007-11-08 7:03 ` [PATCH] Do git reset --hard HEAD when using " Mike Hommey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).