git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: lars.schneider@autodesk.com
Cc: git@vger.kernel.org, gitster@pobox.com, sbeller@google.com,
	sunshine@sunshineco.com, kaartic.sivaraam@gmail.com,
	Lars Schneider <larsxschneider@gmail.com>
Subject: Re: [PATCH v3] launch_editor(): indicate that Git waits for user input
Date: Mon, 27 Nov 2017 20:09:32 +0000	[thread overview]
Message-ID: <20171127200932.GA558049@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20171127134716.69471-1-lars.schneider@autodesk.com>

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

On Mon, Nov 27, 2017 at 02:47:16PM +0100, lars.schneider@autodesk.com wrote:
> From: Junio C Hamano <gitster@pobox.com>
> 
> When a graphical GIT_EDITOR is spawned by a Git command that opens
> and waits for user input (e.g. "git rebase -i"), then the editor window
> might be obscured by other windows. The user may be left staring at the
> original Git terminal window without even realizing that s/he needs to
> interact with another window before Git can proceed. To this user Git
> appears hanging.
> 
> Show a message in the original terminal and get rid of it when the
> editor returns.
> diff --git a/editor.c b/editor.c
> index 7519edecdc..4251ae9d7a 100644
> --- a/editor.c
> +++ b/editor.c
> @@ -40,6 +40,35 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
>  		const char *args[] = { editor, real_path(path), NULL };
>  		struct child_process p = CHILD_PROCESS_INIT;
>  		int ret, sig;
> +		static const char *close_notice = NULL;
> +
> +		if (isatty(2) && !close_notice) {

Sorry for coming to the topic so late, but it occurred to me that we
might want to conditionalize this on an advice.* flag.  I expect there
are some people who will never want to see this, and letting them turn
it off would be good.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

  parent reply	other threads:[~2017-11-27 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 13:47 [PATCH v3] launch_editor(): indicate that Git waits for user input lars.schneider
2017-11-27 17:17 ` Kaartic Sivaraam
2017-11-27 18:36 ` Eric Sunshine
2017-11-27 20:04   ` Lars Schneider
2017-11-27 20:09 ` brian m. carlson [this message]
2017-11-27 23:05   ` Jeff King
2017-11-28  4:29     ` Junio C Hamano
2017-11-28 12:31     ` Lars Schneider
2017-11-29  2:06     ` brian m. carlson
2017-11-27 23:18 ` Junio C Hamano
2017-11-28 12:39   ` Lars Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171127200932.GA558049@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=lars.schneider@autodesk.com \
    --cc=larsxschneider@gmail.com \
    --cc=sbeller@google.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).