Subject: Re: [PATCH] Fix wrong info in `INSTALL`

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 24 May 2022 23:39:31 +0200

On Tue, May 24 2022, Shao-Ce SUN via GitGitGadget wrote:

> From: Shao-Ce SUN <[email-masked]>
>
> The user prompt should be `$` instead of `#`.
>
> Signed-off-by: Shao-Ce SUN <[email-masked]>
> ---
>     Fix wrong info in INSTALL
>     
>     The user prompt should be $ instead of #.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1241%2Fsunshaoce%2Finstall-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1241/sunshaoce/install-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1241
>
>  INSTALL | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/INSTALL b/INSTALL
> index 4140a3f5c8b..7bb3f48311d 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -5,8 +5,8 @@ Normally you can just do "make" followed by "make install", and that
>  will install the git programs in your own ~/bin/ directory.  If you want
>  to do a global install, you can do
>  
> -	$ make prefix=/usr all doc info ;# as yourself
> -	# make prefix=/usr install install-doc install-html install-info ;# as root
> +	$ make prefix=/usr all doc info ; $ as yourself
> +	# make prefix=/usr install install-doc install-html install-info ; # as root
>  
>  (or prefix=/usr/local, of course).  Just like any program suite
>  that uses $prefix, the built results have some paths encoded,
> @@ -20,10 +20,10 @@ config.mak file.
>  Alternatively you can use autoconf generated ./configure script to
>  set up install paths (via config.mak.autogen), so you can write instead
>  
> -	$ make configure ;# as yourself
> -	$ ./configure --prefix=/usr ;# as yourself
> -	$ make all doc ;# as yourself
> -	# make install install-doc install-html;# as root
> +	$ make configure ; $ as yourself
> +	$ ./configure --prefix=/usr ; $ as yourself
> +	$ make all doc ; $ as yourself
> +	# make install install-doc install-html; # as root
>  
>  If you're willing to trade off (much) longer build time for a later
>  faster git you can also do a profile feedback build with
>
> base-commit: 7a3eb286977746bc09a5de7682df0e5a7085e17c

This looks good to me, FWIW I dug into this slightly and didn't know
that POSIX had this to say about it:

        This variable is used for interactive prompts. Historically, the
        "superuser" has had a prompt of '#'. Since privileges are not
        required to be monolithic, it is difficult to define which
        privileges should cause the alternate prompt. However, a
        sufficiently powerful user should be reminded of that power by
        having an alternate prompt.

See https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_05_03

The one suggestion I have here is that the $subject should be clearer, e.g.:

    INSTALL: use '#', not '$' for root-run command prompt

Which in this case would both be better in --oneline output, and be
enough to get rid of the commit message body entirely (unless it wished
to say something more on the subject).