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

Re: [RFC] teach --edit to git rebase

From
Jean Privat <jean.privat@gmail.com>
Date
Oct 11, 2011, 22:36 UTC
Message-ID
<CAMQw0oO+eGxOX=347G0vZPe1uf-SyGGnT1Ku7cykgv4PQK1ZVQ@mail.gmail.com>
In-Reply-To
<CAMQw0oOBEjW3yS2+wcktXDuEuUiHKjfbK2qDzKvBOiwxo7Zkow@mail.gmail.com>
Show 5 quoted lines
> An other alternative is to use a simple git alias for myself (and do
> not bother the git community) but I do not know how to automatize the
> command 'git rebase --interactive' I suppose I need more complex
> infrastructure in the existing 'git rebase' (Maybe I did not look
> enough and there is a way to do it with a git alias).
Hum. I just found that I can do something like :
[alias]
        edit=!GIT_EDITOR='sed -i -e 1s/pick/edit/ --' git rebase -i
-no-autosquash $1^

The main thing that bothers me is that after the rebase, the head is detached (why?)

The other thing is that the error messages for invalid usages are far for perfect

$ git edit toto fatal: Needed a single revision invalid upstream toto^

$ git edit --root toto error: unknown option `root^' usage: git rebase [-i] [options] [--onto <newbase>] [<upstream>] [<branch>] [...]

-Jean
Previous: Jean PrivatNext: Junio C Hamano
Message 2 of 4 in “[RFC] teach --edit to git rebase”
  1. Jean PrivatOct 11, 2011
  2. Jean PrivatOct 11, 2011
  3. Junio C HamanoOct 12, 2011
  4. Jean PrivatOct 12, 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.