{"thread":{"id":"17852","subject":"[PATCH 1/2] Modify description file to say what this file is","startedAt":"2009-02-17T10:12:06Z","lastAt":"2009-02-18T00:16:36Z","messageCount":4,"participants":["John Tapsell","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"105119","messageId":"200902171012.06176.johnflux@gmail.com","threadId":"17852","inReplyTo":null,"subject":"[PATCH 1/2] Modify description file to say what this file is","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2009-02-17T10:12:06Z","receivedAt":"2009-02-17T10:12:06Z","isPatch":true,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"A lot of people see this message for the first time on the gitweb\ninterface, where there is no clue as to what 'this file' means.\n\nSigned-off-by: John Tapsell <johnflux@gmail.com>\n---\n templates/hooks--update.sample |    5 +++--\n templates/this--description    |    2 +-\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\nindex 93c6055..f753d28 100755\n--- a/templates/hooks--update.sample\n+++ b/templates/hooks--update.sample\n@@ -43,10 +43,11 @@ allowdeletetag=$(git config --bool hooks.allowdeletetag)\n \n # check for no description\n projectdesc=$(sed -e '1q' \"$GIT_DIR/description\")\n-if [ -z \"$projectdesc\" -o \"$projectdesc\" = \"Unnamed repository; edit this file to name it for gitweb.\" ]; then\n+case $projectdesc in \"Unnamed repository;\"*|'')\n \techo \"*** Project description file hasn't been set\" >&2\n \texit 1\n-fi\n+\t;;\n+esac\n \n # --- Check types\n # if $newrev is 0000...0000, it's a commit to delete a ref.\ndiff --git a/templates/this--description b/templates/this--description\nindex c6f25e8..914a64e 100644\n--- a/templates/this--description\n+++ b/templates/this--description\n@@ -1 +1 @@\n-Unnamed repository; edit this file to name it for gitweb.\n+Unnamed repository; edit the .git/description file to name it for gitweb.\n-- \n1.6.2.rc1\n"},{"id":"105199","messageId":"7vvdr852nj.fsf@gitster.siamese.dyndns.org","threadId":"17852","inReplyTo":"200902171012.06176.johnflux@gmail.com","subject":"Re: [PATCH 1/2] Modify description file to say what this file is","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-17T18:39:12Z","receivedAt":"2009-02-17T18:39:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n\n> A lot of people see this message for the first time on the gitweb\n> interface, where there is no clue as to what 'this file' means.\n>\n> Signed-off-by: John Tapsell <johnflux@gmail.com>\n\nThanks.\n\n> diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\n> index 93c6055..f753d28 100755\n> --- a/templates/hooks--update.sample\n> +++ b/templates/hooks--update.sample\n> @@ -43,10 +43,11 @@ allowdeletetag=$(git config --bool hooks.allowdeletetag)\n>  \n>  # check for no description\n>  projectdesc=$(sed -e '1q' \"$GIT_DIR/description\")\n> -if [ -z \"$projectdesc\" -o \"$projectdesc\" = \"Unnamed repository; edit this file to name it for gitweb.\" ]; then\n> +case $projectdesc in \"Unnamed repository;\"*|'')\n>  \techo \"*** Project description file hasn't been set\" >&2\n>  \texit 1\n> -fi\n> +\t;;\n> +esac\n\n\"case\" certainly makes it easier to read, but please start a case arm on a\nfresh line, like this:\n\n\tcase $projectdesc in\n        \"Unnamed repository;\"* | '')\n\t\techo \"*** Project description ...\"\n\t\texit 1\n\t\t;;\n\tesac\n\n>  # --- Check types\n>  # if $newrev is 0000...0000, it's a commit to delete a ref.\n> diff --git a/templates/this--description b/templates/this--description\n> index c6f25e8..914a64e 100644\n> --- a/templates/this--description\n> +++ b/templates/this--description\n> @@ -1 +1 @@\n> -Unnamed repository; edit this file to name it for gitweb.\n> +Unnamed repository; edit the .git/description file to name it for gitweb.\n\nI do not have a fundamental objection to this line of changes.  If anybody\nis relying on the exact wording so be it.\n\nBut \".git/description\" is not typically the user has to edit to remedy\nthis situation, because the primary target for both gitweb and git-push is\na bare repository.  I think it is better to say \"edit the 'description'\nfile to name it for gitweb.\"\n"},{"id":"105238","messageId":"43d8ce650902171531r47bd79cco1524ec883e4c6114@mail.gmail.com","threadId":"17852","inReplyTo":"7vvdr852nj.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] Modify description file to say what this file is","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2009-02-17T23:31:08Z","receivedAt":"2009-02-17T23:31:08Z","isPatch":true,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"2009/2/18 Junio C Hamano <gitster@pobox.com>:\n> John Tapsell <johnflux@gmail.com> writes:\n>\n>> A lot of people see this message for the first time on the gitweb\n>> interface, where there is no clue as to what 'this file' means.\n>>\n>> Signed-off-by: John Tapsell <johnflux@gmail.com>\n>\n> Thanks.\n>\n>> diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\n>> index 93c6055..f753d28 100755\n>> --- a/templates/hooks--update.sample\n>> +++ b/templates/hooks--update.sample\n>> @@ -43,10 +43,11 @@ allowdeletetag=$(git config --bool hooks.allowdeletetag)\n>>\n>>  # check for no description\n>>  projectdesc=$(sed -e '1q' \"$GIT_DIR/description\")\n>> -if [ -z \"$projectdesc\" -o \"$projectdesc\" = \"Unnamed repository; edit this file to name it for gitweb.\" ]; then\n>> +case $projectdesc in \"Unnamed repository;\"*|'')\n>>       echo \"*** Project description file hasn't been set\" >&2\n>>       exit 1\n>> -fi\n>> +     ;;\n>> +esac\n>\n> \"case\" certainly makes it easier to read,\nUsing case is a 'hack' to let me check if a string begins with another\nstring, in a way that works in all shells (i.e. without bash\nmanarisims)\n\n> but please start a case arm on a fresh line, like this:\n>\n>        case $projectdesc in\n>        \"Unnamed repository;\"* | '')\n>                echo \"*** Project description ...\"\n>                exit 1\n>                ;;\n>        esac\n>\n>>  # --- Check types\n>>  # if $newrev is 0000...0000, it's a commit to delete a ref.\n>> diff --git a/templates/this--description b/templates/this--description\n>> index c6f25e8..914a64e 100644\n>> --- a/templates/this--description\n>> +++ b/templates/this--description\n>> @@ -1 +1 @@\n>> -Unnamed repository; edit this file to name it for gitweb.\n>> +Unnamed repository; edit the .git/description file to name it for gitweb.\n>\n> I do not have a fundamental objection to this line of changes.  If anybody\n> is relying on the exact wording so be it.\n>\n> But \".git/description\" is not typically the user has to edit to remedy\n> this situation, because the primary target for both gitweb and git-push is\n> a bare repository.  I think it is better to say \"edit the 'description'\n> file to name it for gitweb.\"\n\nBtw, google seems to show other programs using the description file,\nnot just gitweb.  How about changing it to \"Unnamed repository: edit\nthe file 'description' to name the repository\" ?\n"},{"id":"105249","messageId":"7v63j838gr.fsf@gitster.siamese.dyndns.org","threadId":"17852","inReplyTo":"43d8ce650902171531r47bd79cco1524ec883e4c6114@mail.gmail.com","subject":"Re: [PATCH 1/2] Modify description file to say what this file is","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-18T00:16:36Z","receivedAt":"2009-02-18T00:16:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n\n> 2009/2/18 Junio C Hamano <gitster@pobox.com>:\n>\n> Btw, google seems to show other programs using the description file,\n> not just gitweb.  How about changing it to \"Unnamed repository: edit\n> the file 'description' to name the repository\" ?\n\nSure.\n\nI also think \"edit this file 'description' to name...\" (not \"the\", but\n\"this\") would give a bit more hint to a user with a better intuition that\nthe message is not something that is given by an individual program\n(e.g. gitweb or the sample hook) but is a product of catting a file that\nexists somewhere in the repository in question, and may reduce unnecessary\nrequests for help saying \"The program tells me to edit 'description' file,\nbut where should I *create* one?\"\n"}]}