git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Tapsell <johnflux@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] Modify description file to say what this file is
Date: Wed, 18 Feb 2009 08:31:08 +0900	[thread overview]
Message-ID: <43d8ce650902171531r47bd79cco1524ec883e4c6114@mail.gmail.com> (raw)
In-Reply-To: <7vvdr852nj.fsf@gitster.siamese.dyndns.org>

2009/2/18 Junio C Hamano <gitster@pobox.com>:
> John Tapsell <johnflux@gmail.com> writes:
>
>> A lot of people see this message for the first time on the gitweb
>> interface, where there is no clue as to what 'this file' means.
>>
>> Signed-off-by: John Tapsell <johnflux@gmail.com>
>
> Thanks.
>
>> diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample
>> index 93c6055..f753d28 100755
>> --- a/templates/hooks--update.sample
>> +++ b/templates/hooks--update.sample
>> @@ -43,10 +43,11 @@ allowdeletetag=$(git config --bool hooks.allowdeletetag)
>>
>>  # check for no description
>>  projectdesc=$(sed -e '1q' "$GIT_DIR/description")
>> -if [ -z "$projectdesc" -o "$projectdesc" = "Unnamed repository; edit this file to name it for gitweb." ]; then
>> +case $projectdesc in "Unnamed repository;"*|'')
>>       echo "*** Project description file hasn't been set" >&2
>>       exit 1
>> -fi
>> +     ;;
>> +esac
>
> "case" certainly makes it easier to read,
Using case is a 'hack' to let me check if a string begins with another
string, in a way that works in all shells (i.e. without bash
manarisims)

> but please start a case arm on a fresh line, like this:
>
>        case $projectdesc in
>        "Unnamed repository;"* | '')
>                echo "*** Project description ..."
>                exit 1
>                ;;
>        esac
>
>>  # --- Check types
>>  # if $newrev is 0000...0000, it's a commit to delete a ref.
>> diff --git a/templates/this--description b/templates/this--description
>> index c6f25e8..914a64e 100644
>> --- a/templates/this--description
>> +++ b/templates/this--description
>> @@ -1 +1 @@
>> -Unnamed repository; edit this file to name it for gitweb.
>> +Unnamed repository; edit the .git/description file to name it for gitweb.
>
> I do not have a fundamental objection to this line of changes.  If anybody
> is relying on the exact wording so be it.
>
> But ".git/description" is not typically the user has to edit to remedy
> this situation, because the primary target for both gitweb and git-push is
> a bare repository.  I think it is better to say "edit the 'description'
> file to name it for gitweb."

Btw, google seems to show other programs using the description file,
not just gitweb.  How about changing it to "Unnamed repository: edit
the file 'description' to name the repository" ?

  reply	other threads:[~2009-02-17 23:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 10:12 [PATCH 1/2] Modify description file to say what this file is John Tapsell
2009-02-17 18:39 ` Junio C Hamano
2009-02-17 23:31   ` John Tapsell [this message]
2009-02-18  0:16     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-02-17 10:44 John Tapsell
2009-02-17 11:37 ` Sverre Rabbelier
2009-02-17 11:59   ` John Tapsell

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

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

  git send-email \
    --in-reply-to=43d8ce650902171531r47bd79cco1524ec883e4c6114@mail.gmail.com \
    --to=johnflux@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).