Re: [PATCH] rebase: learn --discard subcommand
- From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
- Date
- May 29, 2011, 12:50 UTC
- Message-ID
- <alpine.DEB.2.00.1105290841400.28815@debian>
- In-Reply-To
- <BANLkTim-Wva018BFeTUPqZuiK02-X01XJQ@mail.gmail.com>
On Sat, 28 May 2011, Ramkumar Ramachandra wrote:
Show 8 quoted lines
> > I used "rm -r" without -f to match how it is done in --abort, but > > maybe -f should be used? That is what we recommend to the end-user to > > use today. > > If you've verified that a rebase is already in progress, I don't see > the point of using '-f'. Otherwise, it should error out and say that > "no rebase is in progress", like the other command-line options > currently do.
Yep, it does verify that a rebase is in progress. I think rm without -f still asks the user to confirm if the file is read-only. I can't see why that would happen, so maybe it's good to have the user confirm it it does happen.
Show 5 quoted lines
> > A difference from --abort is that --discard does not clear > > rerere. Need this be mentioned in the documentation? > > It depends on what you're expecting the user to do in this detached > HEAD state, no?
The subcommand will most likely be run when the user had forgotten the current rebase and tries to start a new rebase and get's the message that a rebase is already in progress. At this point, the user is not necessarily in a detached HEAD state any more.
/Martin