Re: [RFC] teach --edit to git rebase
From: Jean Privat <hidden>
Date: 2016-06-15 22:52:14
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