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

Re: [PATCH] Print an error when falling back to vi on a dumb terminal

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 20, 2007, 00:15 UTC
Message-ID
<7vfy3k2an7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11848794193942-git-send-email-aroben@apple.com>
Adam Roben <aroben@apple.com> writes:
Show 33 quoted lines
> Here you go. I'm not terribly happy with the error message, though. I tried to
> be as clear as possible and to keep some of the nice information that was in
> the git-commit error message. Please improve upon it if you can.
>
>  git-am.sh                  |    4 ++--
>  git-commit.sh              |   11 +----------
>  git-rebase--interactive.sh |    2 +-
>  git-sh-setup.sh            |   15 +++++++++++++--
>  git-tag.sh                 |    2 +-
>  5 files changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/git-am.sh b/git-am.sh
> index a5de0a1..dd517f4 100755
> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -7,7 +7,6 @@ USAGE='[--signoff] [--dotest=<dir>] [--utf8 | --no-utf8] [--binary] [--3way]
>    or, when resuming [--skip | --resolved]'
>  . git-sh-setup
>  set_reflog_action am
> -set_editor
>  require_work_tree
>  
>  git var GIT_COMMITTER_IDENT >/dev/null || exit
> @@ -365,7 +364,8 @@ do
>  		[yY]*) action=yes ;;
>  		[aA]*) action=yes interactive= ;;
>  		[nN]*) action=skip ;;
> -		[eE]*) "$GIT_EDITOR" "$dotest/final-commit"
> +		[eE]*) set_editor
> +		       "$GIT_EDITOR" "$dotest/final-commit"
>  		       action=again ;;
>  		[vV]*) action=again
>  		       LESS=-S ${PAGER:-less} "$dotest/patch" ;;
Sounds sane.

Could you please re-diff to make this into a single patch without intermediate "Oh, doing it this way is cleaner", and also with Dscho's Ack? I do not think we would need to have 3 commits for this topic --- it is not like wide userbase tested each iteration.

Previous: Johannes SchindelinNext: Adam Roben
Message 12 of 14 in “Add commit.editor configuration variable”
  1. Add commit.editor configuration variableAdam Roben, Jul 19, 2007
  2. Junio C HamanoJul 19, 2007
  3. Adam RobenJul 19, 2007
  4. Shawn O. PearceJul 19, 2007
  5. Junio C HamanoJul 19, 2007
  6. Johannes SchindelinJul 19, 2007
  7. Add git-sh-setup::set_editor()Adam Roben, Jul 19, 2007
  8. Johannes SchindelinJul 19, 2007
  9. David KastrupJul 19, 2007
  10. Print an error when falling back to vi on a dumb terminalAdam Roben, Jul 19, 2007
  11. Johannes SchindelinJul 19, 2007
  12. Junio C HamanoJul 20, 2007
  13. Add core.editor configuration variableAdam Roben, Jul 20, 2007
  14. Add GIT_EDITOR environment variable and core.editor configuration variableAdam Roben, Jul 20, 2007

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.