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

Re: [PATCH 5/7] add generic terminal prompt function

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 8, 2011, 21:48 UTC
Message-ID
<m38vmmivkc.fsf@localhost.localdomain>
In-Reply-To
<20111208083323.GE26409@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> diff --git a/Makefile b/Makefile
> index b024e2f..2a9bb3d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -227,6 +227,9 @@ all::
> +# Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the
> +# user.
Show 6 quoted lines
> @@ -833,6 +838,7 @@ ifeq ($(uname_S),Linux)
>  	NO_STRLCPY = YesPlease
>  	NO_MKSTEMPS = YesPlease
>  	HAVE_PATHS_H = YesPlease
> +	HAVE_DEV_TTY = YesPlease
>  endif

Here you use HAVE_DEV_TTY (by the way, I wonder if it could be automatically detected by ./configure script)...

Show 12 quoted lines
> diff --git a/compat/terminal.c b/compat/terminal.c
> new file mode 100644
> index 0000000..49f16ca
> --- /dev/null
> +++ b/compat/terminal.c
> @@ -0,0 +1,81 @@
> +#include "git-compat-util.h"
> +#include "compat/terminal.h"
> +#include "sigchain.h"
> +#include "strbuf.h"
> +
> +#ifndef NO_DEV_TTY
> +#endif
  +#endif /* NO_DEV_TTY */
...and here you have NO_DEV_TTY
-- 
Jakub Narębski
Previous: Jeff KingNext: Jeff King
Message 8 of 11 in “[PATCHv2 0/7] getpass refactoring”
  1. Jeff KingDec 8, 2011
  2. 1/7 imap-send: avoid buffer overflowJeff King, Dec 8, 2011
  3. 2/7 imap-send: don't check return value of git_getpassJeff King, Dec 8, 2011
  4. 3/7 move git_getpass to its own source fileJeff King, Dec 8, 2011
  5. 4/7 refactor git_getpass into generic prompt functionJeff King, Dec 8, 2011
  6. Junio C HamanoDec 9, 2011
  7. 5/7 add generic terminal prompt functionJeff King, Dec 8, 2011
  8. Jakub NarebskiDec 8, 2011
  9. Jeff KingDec 8, 2011
  10. 6/7 prompt: use git_terminal_promptJeff King, Dec 8, 2011
  11. 7/7 credential: use git_prompt instead of git_getpassJeff King, Dec 8, 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.