diff mbox series

[RFC,v2,1/6] doc: Tell the glossary about core.hooksPath

Message ID 20200525232727.21096-2-keni@his.com (mailing list archive)
State New, archived
Headers show
Series various documentation bits | expand

Commit Message

Kenneth Lorber May 25, 2020, 11:27 p.m. UTC
The user manual glossary entry for hooks now knows about core.hooksPath.

Signed-off-by: Kenneth Lorber <keni@his.com>
---
 Documentation/glossary-content.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Junio C Hamano May 26, 2020, 6:59 p.m. UTC | #1
Kenneth Lorber <keni@his.com> writes:

> Subject: Re: [RFC PATCH v2 1/6] doc: Tell the glossary about core.hooksPath

Perhaps

    Subject: [PATCH] glossary: describe core.hooksPath

Please separate this one patch out and send it again without the
rest of the series, as this is quite different from the rest of the
6-patch series and an obvious clarification, unlike the others.

> -	operation is done. The hook scripts are found in the
> -	`$GIT_DIR/hooks/` directory, and are enabled by simply
> -	removing the `.sample` suffix from the filename. In earlier versions
> -	of Git you had to make them executable.
> +	operation is done. The hook scripts are found in `$GIT_DIR/hooks/`

You accidentally lost 'the', and because you did an unnecessary
line-wrapping, such a change became harder to spot.  

I am not sure if .sample scripts should be a topioc of this glossary
entry at all to begin with.  And I think it outlived the usefulness
to describe what was in versions of Git that is more than 10 years
old.  I wonder if it is a better idea to take your new description,
but remove everything after "The sample scripts are enabled..."
except for the "see ... for details" link?

> +	or in any directory specified by the `core.hooksPath` configuration
> +	variable.  The sample scripts are enabled by simply
> +	removing the `.sample` suffix from the filename.  In earlier versions
> +	of Git you had to make the sample scripts executable manually.
> +	Hook scripts must be executable.  See linkgit:githooks[5] for details.

>  [[def_index]]index::
>  	A collection of files with stat information, whose contents are stored
Kenneth Lorber May 27, 2020, 4:52 p.m. UTC | #2
> On May 26, 2020, at 2:59 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Kenneth Lorber <keni@his.com> writes:
> 
>> Subject: Re: [RFC PATCH v2 1/6] doc: Tell the glossary about core.hooksPath
> 
> Perhaps
> 
>    Subject: [PATCH] glossary: describe core.hooksPath
> 
> Please separate this one patch out and send it again without the
> rest of the series, as this is quite different from the rest of the
> 6-patch series and an obvious clarification, unlike the others.

Will do.

> 
>> -	operation is done. The hook scripts are found in the
>> -	`$GIT_DIR/hooks/` directory, and are enabled by simply
>> -	removing the `.sample` suffix from the filename. In earlier versions
>> -	of Git you had to make them executable.
>> +	operation is done. The hook scripts are found in `$GIT_DIR/hooks/`
> 
> You accidentally lost 'the', and because you did an unnecessary
> line-wrapping, such a change became harder to spot.  

My apologies.

> 
> I am not sure if .sample scripts should be a topioc of this glossary
> entry at all to begin with.  And I think it outlived the usefulness
> to describe what was in versions of Git that is more than 10 years
> old.  I wonder if it is a better idea to take your new description,
> but remove everything after "The sample scripts are enabled..."
> except for the "see ... for details" link?

I had considered it but didn't want to presume.  If I don't hear any objections
I will take it out.

> 
>> +	or in any directory specified by the `core.hooksPath` configuration
>> +	variable.  The sample scripts are enabled by simply
>> +	removing the `.sample` suffix from the filename.  In earlier versions
>> +	of Git you had to make the sample scripts executable manually.
>> +	Hook scripts must be executable.  See linkgit:githooks[5] for details.
> 
>> [[def_index]]index::
>> 	A collection of files with stat information, whose contents are stored
Kenneth Lorber May 27, 2020, 5:18 p.m. UTC | #3
> On May 27, 2020, at 12:52 PM, Kenneth Lorber <keni@his.com> wrote:
> 
> 
> 
>> On May 26, 2020, at 2:59 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> 
>> Kenneth Lorber <keni@his.com> writes:
>> 
>>> Subject: Re: [RFC PATCH v2 1/6] doc: Tell the glossary about core.hooksPath
>> 
>> Perhaps
>> 
>>   Subject: [PATCH] glossary: describe core.hooksPath
>> 
>> Please separate this one patch out and send it again without the
>> rest of the series, as this is quite different from the rest of the
>> 6-patch series and an obvious clarification, unlike the others.
> 
> Will do.
> 
>> 
>>> -	operation is done. The hook scripts are found in the
>>> -	`$GIT_DIR/hooks/` directory, and are enabled by simply
>>> -	removing the `.sample` suffix from the filename. In earlier versions
>>> -	of Git you had to make them executable.
>>> +	operation is done. The hook scripts are found in `$GIT_DIR/hooks/`
>> 
>> You accidentally lost 'the', and because you did an unnecessary
>> line-wrapping, such a change became harder to spot.  
> 
> My apologies.

I just read this section a couple more times and I think the dropped "the"
is correct since the sentence structure has changed.

The sentence in question, unwrapped:
The hook scripts are found in `$GIT_DIR/hooks/` or in any directory specified by the `core.hooksPath` configuration variable.

It might deserve some additional changes though, since the above vaguely implies both locations are checked, which is incorrect.  Perhaps this is more accurate:
The hook scripts are found in the directory specified by the `core.hooksPath` configuration variable; the default location is `$GIT_DIR/hooks/`.


> 
>> 
>> I am not sure if .sample scripts should be a topioc of this glossary
>> entry at all to begin with.  And I think it outlived the usefulness
>> to describe what was in versions of Git that is more than 10 years
>> old.  I wonder if it is a better idea to take your new description,
>> but remove everything after "The sample scripts are enabled..."
>> except for the "see ... for details" link?
> 
> I had considered it but didn't want to presume.  If I don't hear any objections
> I will take it out.
> 
>> 
>>> +	or in any directory specified by the `core.hooksPath` configuration
>>> +	variable.  The sample scripts are enabled by simply
>>> +	removing the `.sample` suffix from the filename.  In earlier versions
>>> +	of Git you had to make the sample scripts executable manually.
>>> +	Hook scripts must be executable.  See linkgit:githooks[5] for details.
>> 
>>> [[def_index]]index::
>>> 	A collection of files with stat information, whose contents are stored
>
Junio C Hamano May 27, 2020, 5:18 p.m. UTC | #4
Kenneth Lorber <keni@his.com> writes:

>> I am not sure if .sample scripts should be a topioc of this glossary
>> entry at all to begin with.  And I think it outlived the usefulness
>> to describe what was in versions of Git that is more than 10 years
>> old.  I wonder if it is a better idea to take your new description,
>> but remove everything after "The sample scripts are enabled..."
>> except for the "see ... for details" link?
>
> I had considered it but didn't want to presume.  If I don't hear any objections
> I will take it out.

If it is not too much trouble, it probably is a better organization
to make this a two-patch series, whose first patch leaves the
original description on .sample files in, and the second patch that
builds on top of the first patch removes the description on .sample
files.  That way, if people still likes to see the description on
.sample, we can just drop the second patch and still use the first
patch.

Thanks.
diff mbox series

Patch

diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 090c888335..37147db1bc 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -206,10 +206,12 @@  for a more flexible and robust system to do the same thing.
 	to optional scripts that allow a developer to add functionality or
 	checking. Typically, the hooks allow for a command to be pre-verified
 	and potentially aborted, and allow for a post-notification after the
-	operation is done. The hook scripts are found in the
-	`$GIT_DIR/hooks/` directory, and are enabled by simply
-	removing the `.sample` suffix from the filename. In earlier versions
-	of Git you had to make them executable.
+	operation is done. The hook scripts are found in `$GIT_DIR/hooks/`
+	or in any directory specified by the `core.hooksPath` configuration
+	variable.  The sample scripts are enabled by simply
+	removing the `.sample` suffix from the filename.  In earlier versions
+	of Git you had to make the sample scripts executable manually.
+	Hook scripts must be executable.  See linkgit:githooks[5] for details.
 
 [[def_index]]index::
 	A collection of files with stat information, whose contents are stored