Re: Allow editing of a revert-message
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 23, 2005, 19:29 UTC
- Message-ID
- <7v7jaz5fj7.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0511230954440.13959@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> ..., although I > actually suspect it should be on by default (and we should have a > "--no-edit" flag to disable it, probably together with an automatic > disable if stdin isn't a terminal).
Thanks, and I agree. It is very very unlikely that somebody has git-revert in her script and relies on git-revert to be non-interactive, so we might not even need --no-edit.
> +[ "$edit" ] && ${EDITOR:-${VISUAL:-vi}} .msg
> case "$no_commit" in
> '')
> git-commit -n -F .msgI think we can do
-e)
edit="-e" ;;
..git-commit -n -F .msg $edit
to lose the ${EDITOR-${VISUAL-vi}} part..