{"thread":{"id":"57920","subject":"[PATCH] Fix wrong info in `INSTALL`","startedAt":"2022-05-24T20:43:26Z","lastAt":"2022-05-25T16:05:46Z","messageCount":6,"participants":["Shao-Ce SUN via GitGitGadget","Ævar Arnfjörð Bjarmason","Philippe Blain","Junio C Hamano","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"455952","messageId":"pull.1241.git.1653424998869.gitgitgadget@gmail.com","threadId":"57920","inReplyTo":null,"subject":"[PATCH] Fix wrong info in `INSTALL`","fromName":"Shao-Ce SUN via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-05-24T20:43:18Z","receivedAt":"2022-05-24T20:43:26Z","isPatch":true,"sender":{"key":"name:Shao-Ce SUN","avatar":null},"body":"From: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n\nThe user prompt should be `$` instead of `#`.\n\nSigned-off-by: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n---\n    Fix wrong info in INSTALL\n    \n    The user prompt should be $ instead of #.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1241%2Fsunshaoce%2Finstall-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1241/sunshaoce/install-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1241\n\n INSTALL | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/INSTALL b/INSTALL\nindex 4140a3f5c8b..7bb3f48311d 100644\n--- a/INSTALL\n+++ b/INSTALL\n@@ -5,8 +5,8 @@ Normally you can just do \"make\" followed by \"make install\", and that\n will install the git programs in your own ~/bin/ directory.  If you want\n to do a global install, you can do\n \n-\t$ make prefix=/usr all doc info ;# as yourself\n-\t# make prefix=/usr install install-doc install-html install-info ;# as root\n+\t$ make prefix=/usr all doc info ; $ as yourself\n+\t# make prefix=/usr install install-doc install-html install-info ; # as root\n \n (or prefix=/usr/local, of course).  Just like any program suite\n that uses $prefix, the built results have some paths encoded,\n@@ -20,10 +20,10 @@ config.mak file.\n Alternatively you can use autoconf generated ./configure script to\n set up install paths (via config.mak.autogen), so you can write instead\n \n-\t$ make configure ;# as yourself\n-\t$ ./configure --prefix=/usr ;# as yourself\n-\t$ make all doc ;# as yourself\n-\t# make install install-doc install-html;# as root\n+\t$ make configure ; $ as yourself\n+\t$ ./configure --prefix=/usr ; $ as yourself\n+\t$ make all doc ; $ as yourself\n+\t# make install install-doc install-html; # as root\n \n If you're willing to trade off (much) longer build time for a later\n faster git you can also do a profile feedback build with\n\nbase-commit: 7a3eb286977746bc09a5de7682df0e5a7085e17c\n-- \ngitgitgadget\n"},{"id":"455967","messageId":"220524.86a6b6vcao.gmgdl@evledraar.gmail.com","threadId":"57920","inReplyTo":"pull.1241.git.1653424998869.gitgitgadget@gmail.com","subject":"Re: [PATCH] Fix wrong info in `INSTALL`","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-05-24T21:39:31Z","receivedAt":"2022-05-24T21:41:28Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, May 24 2022, Shao-Ce SUN via GitGitGadget wrote:\n\n> From: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n>\n> The user prompt should be `$` instead of `#`.\n>\n> Signed-off-by: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n> ---\n>     Fix wrong info in INSTALL\n>     \n>     The user prompt should be $ instead of #.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1241%2Fsunshaoce%2Finstall-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1241/sunshaoce/install-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1241\n>\n>  INSTALL | 12 ++++++------\n>  1 file changed, 6 insertions(+), 6 deletions(-)\n>\n> diff --git a/INSTALL b/INSTALL\n> index 4140a3f5c8b..7bb3f48311d 100644\n> --- a/INSTALL\n> +++ b/INSTALL\n> @@ -5,8 +5,8 @@ Normally you can just do \"make\" followed by \"make install\", and that\n>  will install the git programs in your own ~/bin/ directory.  If you want\n>  to do a global install, you can do\n>  \n> -\t$ make prefix=/usr all doc info ;# as yourself\n> -\t# make prefix=/usr install install-doc install-html install-info ;# as root\n> +\t$ make prefix=/usr all doc info ; $ as yourself\n> +\t# make prefix=/usr install install-doc install-html install-info ; # as root\n>  \n>  (or prefix=/usr/local, of course).  Just like any program suite\n>  that uses $prefix, the built results have some paths encoded,\n> @@ -20,10 +20,10 @@ config.mak file.\n>  Alternatively you can use autoconf generated ./configure script to\n>  set up install paths (via config.mak.autogen), so you can write instead\n>  \n> -\t$ make configure ;# as yourself\n> -\t$ ./configure --prefix=/usr ;# as yourself\n> -\t$ make all doc ;# as yourself\n> -\t# make install install-doc install-html;# as root\n> +\t$ make configure ; $ as yourself\n> +\t$ ./configure --prefix=/usr ; $ as yourself\n> +\t$ make all doc ; $ as yourself\n> +\t# make install install-doc install-html; # as root\n>  \n>  If you're willing to trade off (much) longer build time for a later\n>  faster git you can also do a profile feedback build with\n>\n> base-commit: 7a3eb286977746bc09a5de7682df0e5a7085e17c\n\nThis looks good to me, FWIW I dug into this slightly and didn't know\nthat POSIX had this to say about it:\n\n        This variable is used for interactive prompts. Historically, the\n        \"superuser\" has had a prompt of '#'. Since privileges are not\n        required to be monolithic, it is difficult to define which\n        privileges should cause the alternate prompt. However, a\n        sufficiently powerful user should be reminded of that power by\n        having an alternate prompt.\n\nSee https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_05_03\n\nThe one suggestion I have here is that the $subject should be clearer, e.g.:\n\n    INSTALL: use '#', not '$' for root-run command prompt\n\nWhich in this case would both be better in --oneline output, and be\nenough to get rid of the commit message body entirely (unless it wished\nto say something more on the subject).\n"},{"id":"455974","messageId":"572f5565-3892-2056-f202-b547ced4a9fc@gmail.com","threadId":"57920","inReplyTo":"220524.86a6b6vcao.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] Fix wrong info in `INSTALL`","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2022-05-24T22:03:27Z","receivedAt":"2022-05-24T22:03:36Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi Shao-Ce,\n\nLe 2022-05-24 à 17:39, Ævar Arnfjörð Bjarmason a écrit :\n> \n> On Tue, May 24 2022, Shao-Ce SUN via GitGitGadget wrote:\n> \n>> From: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n>>\n>> The user prompt should be `$` instead of `#`.\n>>\n>> Signed-off-by: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n>> ---\n>>     Fix wrong info in INSTALL\n>>     \n>>     The user prompt should be $ instead of #.\n>>\n>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1241%2Fsunshaoce%2Finstall-v1\n>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1241/sunshaoce/install-v1\n>> Pull-Request: https://github.com/gitgitgadget/git/pull/1241\n>>\n>>  INSTALL | 12 ++++++------\n>>  1 file changed, 6 insertions(+), 6 deletions(-)\n>>\n>> diff --git a/INSTALL b/INSTALL\n>> index 4140a3f5c8b..7bb3f48311d 100644\n>> --- a/INSTALL\n>> +++ b/INSTALL\n>> @@ -5,8 +5,8 @@ Normally you can just do \"make\" followed by \"make install\", and that\n>>  will install the git programs in your own ~/bin/ directory.  If you want\n>>  to do a global install, you can do\n>>  \n>> -\t$ make prefix=/usr all doc info ;# as yourself\n>> -\t# make prefix=/usr install install-doc install-html install-info ;# as root\n>> +\t$ make prefix=/usr all doc info ; $ as yourself\n>> +\t# make prefix=/usr install install-doc install-html install-info ; # as root\n\nThe prompt for the first invocation is already '$',\nwhat you are changing in the first line is the '# as yourself' comment\nwhich is a shell comment and thus uses '#'. This allows \nthe whole line to be pasted as-is.\n\nThe second line is supposed to be ran as root and already has '#' as\nprompt, and also has '# as root' as a comment, which you simply\nprefix with a space.\n\nI don't think there is anything to \"fix\" here...\n\n>>  \n>>  (or prefix=/usr/local, of course).  Just like any program suite\n>>  that uses $prefix, the built results have some paths encoded,\n>> @@ -20,10 +20,10 @@ config.mak file.\n>>  Alternatively you can use autoconf generated ./configure script to\n>>  set up install paths (via config.mak.autogen), so you can write instead\n>>  \n>> -\t$ make configure ;# as yourself\n>> -\t$ ./configure --prefix=/usr ;# as yourself\n>> -\t$ make all doc ;# as yourself\n>> -\t# make install install-doc install-html;# as root\n>> +\t$ make configure ; $ as yourself\n>> +\t$ ./configure --prefix=/usr ; $ as yourself\n>> +\t$ make all doc ; $ as yourself\n>> +\t# make install install-doc install-html; # as root\n\nSame here.\n"},{"id":"455978","messageId":"xmqqpmk2efn0.fsf@gitster.g","threadId":"57920","inReplyTo":"pull.1241.git.1653424998869.gitgitgadget@gmail.com","subject":"Re: [PATCH] Fix wrong info in `INSTALL`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-05-24T22:21:07Z","receivedAt":"2022-05-24T22:21:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shao-Ce SUN via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> -\t$ make prefix=/usr all doc info ;# as yourself\n> -\t# make prefix=/usr install install-doc install-html install-info ;# as root\n> +\t$ make prefix=/usr all doc info ; $ as yourself\n\nThis and all the changes in the patch is wrong, but it is not\nentirely your fault.  You need to know the shell syntax.\n\nThe semicolon in \";#\" is an end of one command (i.e. \"make\"), and\nthe hash is \"start of comment--ignore the rest of the line.\n\nIf you replace # with $, then \"$ as yourself\" would be fed to the\nshell because $ is not a comment introducer.  The command line no\nlonger can be copied and pasted, starting from \"make\" to the end of\nthe line.\n\nThanks.\n\n"},{"id":"456000","messageId":"CAP8UFD2BS3OuJD7xhb6M+bX3ojLqM8ZuXK_h4w0CvdYRfmzVqg@mail.gmail.com","threadId":"57920","inReplyTo":"pull.1241.git.1653424998869.gitgitgadget@gmail.com","subject":"Re: [PATCH] Fix wrong info in `INSTALL`","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2022-05-25T05:29:50Z","receivedAt":"2022-05-25T05:30:08Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Wed, May 25, 2022 at 6:35 AM Shao-Ce SUN via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n>\n> The user prompt should be `$` instead of `#`.\n\nOn the following lines:\n\n$ make prefix=/usr all doc info ;# as yourself\n# make prefix=/usr install install-doc install-html install-info ;# as root\n\nthe '$' or '#' before \"make\" is indeed a prompt, but the '#' before\n\"as\" starts a single line comment. So there is no need to change it\ninto a '$'.\n\nSee for example:\n\nhttps://tldp.org/LDP/abs/html/abs-guide.html#SPECIAL-CHARS\n\nOne issue with the above lines could be that there is no space\ncharacter before the '#' that starts the comments. The ';' is a\ncommand separator character though, and I think that when a new\ncommand starts with '#' it's considered a comment.\n\nSo we could perhaps get rid of the ';', but on the other hand \";#\"\nshould make it extra clear that the command before it ended and that\nthe rest of the line is a comment.\n\n> Signed-off-by: Shao-Ce SUN <sunshaoce@iscas.ac.cn>\n> ---\n>     Fix wrong info in INSTALL\n\nInstead of \"info\" you could say something more specific like \"prompt character\".\n\nAlso we start commit subjects with the area of the code, so maybe\n\"INSTALL: fix wrong prompt character\".\n\n> diff --git a/INSTALL b/INSTALL\n> index 4140a3f5c8b..7bb3f48311d 100644\n> --- a/INSTALL\n> +++ b/INSTALL\n> @@ -5,8 +5,8 @@ Normally you can just do \"make\" followed by \"make install\", and that\n>  will install the git programs in your own ~/bin/ directory.  If you want\n>  to do a global install, you can do\n>\n> -       $ make prefix=/usr all doc info ;# as yourself\n> -       # make prefix=/usr install install-doc install-html install-info ;# as root\n> +       $ make prefix=/usr all doc info ; $ as yourself\n\nHere a '#' is changed into a '$' but also a space character is\ninserted before the '$' without any explanation.\n\n> +       # make prefix=/usr install install-doc install-html install-info ; # as root\n\nHere only a space character is inserted before the second '#' without\nany explanation.\n"},{"id":"456103","messageId":"xmqqo7zla985.fsf@gitster.g","threadId":"57920","inReplyTo":"CAP8UFD2BS3OuJD7xhb6M+bX3ojLqM8ZuXK_h4w0CvdYRfmzVqg@mail.gmail.com","subject":"Re: [PATCH] Fix wrong info in `INSTALL`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-05-25T16:05:30Z","receivedAt":"2022-05-25T16:05:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <christian.couder@gmail.com> writes:\n\n> So we could perhaps get rid of the ';', but on the other hand \";#\"\n> should make it extra clear that the command before it ended and that\n> the rest of the line is a comment.\n\nTrue.  In modern shells, \";\" in the \";#\" sequence may not be\nnecessary, but consistently writing \";#\" as if it were a single\ntoken would probably be a good idea in the documentation.\n\nOf course, if we can declare that the usefulness of the monospace\nplain text document does not matter, we could do without \";#\" and\ntypeset the comment (and the prompt) in different font and/or color.\nIt would make it easier to see which part of the line is what is to\nbe typed verbatim.\n\nThanks.\n\n"}]}