git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase: learn --discard subcommand

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 28, 2011, 13:15 UTC
Message-ID
<BANLkTim-Wva018BFeTUPqZuiK02-X01XJQ@mail.gmail.com>
In-Reply-To
<1306551495-26685-1-git-send-email-martin.von.zweigbergk@gmail.com>
Hi Martin,
Martin von Zweigbergk writes:
Show 10 quoted lines
> A long time ago I said I wished that 'git rebase --abort' would move
> back to the where HEAD was when the rebase was initiated, instead of
> moving back to the branch that was about to be rebased (which may be
> different for "git rebase $upstream $branch"). I think Junio then
> hinted that he sometimes wished that he could abort rebase without
> moving to anywhere else at all, which is what this patch implements. I
> don't feel strongly about this patch, but I would probably also use
> this subcommand once in a while. However, maybe the greatest value in
> it is that we don't have to tell users to mess with the .git
> directory?

Interesting. Yes, I usually remove the state file by hand too. In view of "git rebase --interactive" being a porcelain command, I don't know if it's alright to drop the user into a detached HEAD state.

> 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.

> 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?

> I have not been involved in Ramkumar's work on the sequencer to know
> if and how this might impact it.
It'll have no impact on the Sequencer work. Thanks.
-- Ram
Previous: Martin von ZweigbergkNext: Martin von Zweigbergk
Message 2 of 17 in “rebase: learn --discard subcommand”
  1. rebase: learn --discard subcommandMartin von Zweigbergk, May 28, 2011
  2. Ramkumar RamachandraMay 28, 2011
  3. Martin von ZweigbergkMay 29, 2011
  4. Junio C HamanoMay 28, 2011
  5. Tim MazidMay 28, 2011
  6. Jonathan NiederMay 28, 2011
  7. Martin von ZweigbergkMay 29, 2011
  8. Jakub NarebskiMay 29, 2011
  9. Michael HaggertyMay 30, 2011
  10. Jonathan NiederMay 28, 2011
  11. Tim MazidMay 29, 2011
  12. Martin von ZweigbergkMay 29, 2011
  13. Jonathan NiederMay 29, 2011
  14. Michael HaggertyMay 30, 2011
  15. Tim MazidMay 30, 2011
  16. Michael HaggertyMay 30, 2011
  17. Miles BaderMay 30, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.