* [PATCH 1/2] Modify description file to say what this file is
@ 2009-02-17 10:12 John Tapsell
2009-02-17 18:39 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: John Tapsell @ 2009-02-17 10:12 UTC (permalink / raw)
To: Git Mailing List
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>
---
templates/hooks--update.sample | 5 +++--
templates/this--description | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
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
# --- 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.
--
1.6.2.rc1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Modify description file to say what this file is
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
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2009-02-17 18:39 UTC (permalink / raw)
To: John Tapsell; +Cc: Git Mailing List
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, 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."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Modify description file to say what this file is
2009-02-17 18:39 ` Junio C Hamano
@ 2009-02-17 23:31 ` John Tapsell
2009-02-18 0:16 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: John Tapsell @ 2009-02-17 23:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
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" ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Modify description file to say what this file is
2009-02-17 23:31 ` John Tapsell
@ 2009-02-18 0:16 ` Junio C Hamano
0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2009-02-18 0:16 UTC (permalink / raw)
To: John Tapsell; +Cc: Git Mailing List
John Tapsell <johnflux@gmail.com> writes:
> 2009/2/18 Junio C Hamano <gitster@pobox.com>:
>
> 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" ?
Sure.
I also think "edit this file 'description' to name..." (not "the", but
"this") would give a bit more hint to a user with a better intuition that
the message is not something that is given by an individual program
(e.g. gitweb or the sample hook) but is a product of catting a file that
exists somewhere in the repository in question, and may reduce unnecessary
requests for help saying "The program tells me to edit 'description' file,
but where should I *create* one?"
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] Modify description file to say what this file is
@ 2009-02-17 10:44 John Tapsell
2009-02-17 11:37 ` Sverre Rabbelier
0 siblings, 1 reply; 7+ messages in thread
From: John Tapsell @ 2009-02-17 10:44 UTC (permalink / raw)
To: Git Mailing List
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>
---
templates/hooks--update.sample | 5 +++--
templates/this--description | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
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
# --- 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.
--
1.6.2.rc1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Modify description file to say what this file is
2009-02-17 10:44 John Tapsell
@ 2009-02-17 11:37 ` Sverre Rabbelier
2009-02-17 11:59 ` John Tapsell
0 siblings, 1 reply; 7+ messages in thread
From: Sverre Rabbelier @ 2009-02-17 11:37 UTC (permalink / raw)
To: John Tapsell; +Cc: Git Mailing List
Heya,
On Tue, Feb 17, 2009 at 11:44, John Tapsell <johnflux@gmail.com> wrote:
> 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.
It seems you somehow managed to send the exact same message 4 times, what gives?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Modify description file to say what this file is
2009-02-17 11:37 ` Sverre Rabbelier
@ 2009-02-17 11:59 ` John Tapsell
0 siblings, 0 replies; 7+ messages in thread
From: John Tapsell @ 2009-02-17 11:59 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: Git Mailing List
2009/2/17 Sverre Rabbelier <srabbelier@gmail.com>:
> Heya,
>
> On Tue, Feb 17, 2009 at 11:44, John Tapsell <johnflux@gmail.com> wrote:
>> 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.
>
> It seems you somehow managed to send the exact same message 4 times, what gives?
I'm really sorry. Gmail kept mangling it, then my email client said
it wasn't sending.. bah. I've got it sorted it out now.
John
>
> --
> Cheers,
>
> Sverre Rabbelier
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-18 0:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).