Skip to contentSkip to conversation

various documentation bits

RFC PATCH In review Kenneth Lorber 4 participants 42 messages May 17, 2020 – Jun 1, 2020 Documentation

lore
Share & tools
lore
#0 lore raw

cover various documentation bits

From: Kenneth Lorber <[email protected]>

This started as an effort to understand this section of config.txt:
When inventing new variables for use in your own tool, make sure their names do not conflict with those that are used by Git itself and other popular tools, and describe them in your documentation.
and grew from there.

I don't expect this to be adopted as is, but I've found it much easier to discuss something concrete rather than an abstract "this is incomplete" or "this is hard to find."

Cut from master.

keni (6):
Tell the glossary about core.hooksPath
Add bit on extending git to Hacking Git
Add namespace collision avoidance guidelines file Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt Tell config.txt about NAMESPACE COLLISIONS
Add NAMESPACE COLLISIONS reference to Hacking Git

 Documentation/config.txt                      |  4 +-
 Documentation/gitrepository-layout.txt        |  2 +
 Documentation/glossary-content.txt            | 10 ++-
 .../technical/namespace-collisions.txt        | 86 +++++++++++++++++++
 Documentation/user-manual.txt                 |  9 ++
 5 files changed, 106 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Signature · 1 line
2.17.1
#1 lore raw

RFC PATCH 1/6 Tell the glossary about core.hooksPath

From: Kenneth Lorber <[email protected]>

The user manual glossary entry for hooks now knows about core.hooksPath.

---
 Documentation/glossary-content.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Documentation/glossary-content.txt +6 -4
index 090c888335..37147db1bc 100644
@@ -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
Signature · 1 line
2.17.1
#2 lore raw

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

Quoted 8 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

The user manual glossary entry for hooks now knows about core.hooksPath.

---
 Documentation/glossary-content.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

That's a gap worth filling.

Quoted 5 lines
Documentation/glossary-content.txt +0 -0
index 090c888335..37147db1bc 100644

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 210

Quoted 9 lines
Documentation/glossary-content.txt +2 -4
@@ -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

I expect "the", instead of "any", would make more sense to readers.

It is true that you can choose any directory of your liking and specify it via the variable, but once chosen that would be the only directory used for the purpose.

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 217

Quoted 7 lines
Documentation/glossary-content.txt +4 -0
+	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

Thanks.

#3 lore raw

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

Quoted 8 lines · Junio C Hamano
Quoted 2 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Quoted 8 lines
Quoted 6 lines

The user manual glossary entry for hooks now knows about core.hooksPath.

---
Documentation/glossary-content.txt | 10 ++++++----

1 file changed, 6 insertions(+), 4 deletions(-)

That's a gap worth filling.

Thanks.

Quoted 17 lines
Quoted 6 lines
Documentation/glossary-content.txt +0 -0
index 090c888335..37147db1bc 100644

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 210

Quoted 9 lines
Documentation/glossary-content.txt +2 -4
@@ -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

I expect "the", instead of "any", would make more sense to readers.

I agree, but I copied it from user-manual.txt, search for core.excludesFile. Should it be changed there as well?

Quoted 10 lines

It is true that you can choose any directory of your liking and specify it via the variable, but once chosen that would be the only directory used for the purpose.

Quoted 5 lines
Documentation/glossary-content.txt +4 -0
+	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.
 
Quoted 4 lines
Quoted 2 lines

[[def_index]]index::
A collection of files with stat information, whose contents are stored

Thanks.

You're welcome.

#4 lore raw

RFC PATCH 2/6 Add bit on extending git to Hacking Git

In reply to Kenneth Lorber

From: Kenneth Lorber <[email protected]>

The Hacking Git section of the user manual is the logical place to look for information on extending Gut, so add a short section of links to places where that information actually lives.

---
 Documentation/user-manual.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/user-manual.txt +8 -0
index 833652983f..2144246444 100644
@@ -4049,6 +4049,14 @@ and that is what higher level `git merge -s resolve` is implemented with.
 This chapter covers internal details of the Git implementation which
 probably only Git developers need to understand.
 
+If you are extending Git using hooks, writing new tools, or otherwise
+looking for technical information but not hacking Git itself, the following
+documents may be what you are really looking for:
+
+* hooks: linkgit:githooks[5]
+* attributes: linkgit:gitattributes[5]
+* new tools: linkgit:git-sh-setup[1]
+
 [[object-details]]
 === Object storage format
 
Signature · 1 line
2.17.1
#5 lore raw

Re: [RFC PATCH 2/6] Add bit on extending git to Hacking Git

Quoted 16 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

The Hacking Git section of the user manual is the logical place to look for information on extending Gut, so add a short section of links to places where that information actually lives.

---
 Documentation/user-manual.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/user-manual.txt +0 -0
index 833652983f..2144246444 100644

Documentation/user-manual.txt and that is what higher level `git merge -s resolve` is implemented with. · line 4058

Quoted 10 lines
Documentation/user-manual.txt +7 -0
@@ -4049,6 +4049,14 @@ and that is what higher level `git merge -s resolve` is implemented with.
 This chapter covers internal details of the Git implementation which
 probably only Git developers need to understand.
 
+If you are extending Git using hooks, writing new tools, or otherwise
+looking for technical information but not hacking Git itself, the following
+documents may be what you are really looking for:
+
+* hooks: linkgit:githooks[5]
+* attributes: linkgit:gitattributes[5]
+* new tools: linkgit:git-sh-setup[1]

I am not sure if this fits here. It is a distraction to the target audience of this section, no?

#6 lore raw

Re: [RFC PATCH 2/6] Add bit on extending git to Hacking Git

Quoted 25 lines · Junio C Hamano
Quoted 19 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

The Hacking Git section of the user manual is the logical place to look for information on extending Gut, so add a short section of links to places where that information actually lives.

---
Documentation/user-manual.txt | 8 ++++++++

1 file changed, 8 insertions(+)
Documentation/user-manual.txt +0 -0
index 833652983f..2144246444 100644
@@ -4049,6 +4049,14 @@ and that is what higher level `git merge -s resolve` is implemented with.

This chapter covers internal details of the Git implementation which probably only Git developers need to understand.

Quoted 10 lines

Documentation/user-manual.txt and that is what higher level `git merge -s resolve` is implemented with. · line 4058

Quoted 7 lines
Documentation/user-manual.txt +7 -0
+If you are extending Git using hooks, writing new tools, or otherwise
+looking for technical information but not hacking Git itself, the following
+documents may be what you are really looking for:
+
+* hooks: linkgit:githooks[5]
+* attributes: linkgit:gitattributes[5]
+* new tools: linkgit:git-sh-setup[1]

I am not sure if this fits here. It is a distraction to the target audience of this section, no?

I agree and still think this is where it goes (unless we start a new chapter on hacking FOR git, which is more than I can handle at the moment).

My reasoning is that from the available chapters, this is my best bet (as a new user) for finding this information; pointing them elsewhere isn't that big a distraction (it's at the top and short) and would be a great help for people looking for that kind of info.

My two cents anyway.

#7 lore raw

RFC PATCH 3/6 Add namespace collision avoidance guidelines file

In reply to Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

---
 Documentation/gitrepository-layout.txt        |  1 +
 .../technical/namespace-collisions.txt        | 86 +++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Documentation/gitrepository-layout.txt +1 -0
index 1a2ef4c150..a84a4df513 100644
@@ -290,6 +290,7 @@ worktrees/<id>/locked::
 worktrees/<id>/config.worktree::
 	Working directory specific configuration file.
 
+include::technical/namespace-collisions.txt[]
 include::technical/repository-version.txt[]
 
 SEE ALSO
Documentation/technical/namespace-collisions.txt new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
2.17.1
#8 lore raw

Re: [RFC PATCH 3/6] Add namespace collision avoidance guidelines file

Hello Kenneth,

Quoted 7 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

---

Since most users (including me) have never faced a namespace collision with Git before, you might have to make a stronger case for why this adding namespace collisions to documentation is important.

I honestly don't have enough knowledge of Git internals to talk about any changes to the guidelines itself.

Quoted 23 lines
 Documentation/gitrepository-layout.txt        |  1 +
 .../technical/namespace-collisions.txt        | 86 +++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Documentation/gitrepository-layout.txt +1 -0
index 1a2ef4c150..a84a4df513 100644
@@ -290,6 +290,7 @@ worktrees/<id>/locked::
 worktrees/<id>/config.worktree::
 	Working directory specific configuration file.
 
+include::technical/namespace-collisions.txt[]
 include::technical/repository-version.txt[]
 
 SEE ALSO
Documentation/technical/namespace-collisions.txt new file +0 -0
new file mode 100644
index 0000000000..fb79c82a73

Documentation/technical/namespace-collisions.txt line 5

Quoted 5 lines
Documentation/technical/namespace-collisions.txt new file +5 -0
@@ -0,0 +1,86 @@
+gitattributes
+
+
+NAMESPACE COLLISIONS
+--------------------

A convention I have noticed is that "========" is for the document header and "--------" is for section headers.

Quoted 84 lines
Documentation/technical/namespace-collisions.txt new file +81 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes
+
+In order to reduce the chance of collisions between names Git uses
+and those used by other entities (users, groups, and extension authors),
+the following are recommended best practices.
+
+Names reserved to Git:
+
+* file or directory names ending with `.lock`
+* file or directory names starting with `.git`
+* filenames in $GIT_DIR
+* directory names in $GIT_DIR unless allowed by a rule below
+* environment variables starting with `GIT_`
+* configuration file sections unless allowed by a rule below
+* file or directory names in `$GIT_DIR/hooks` unless allowed by a rule below
+* attributes unless allowed by a rule below
+
+
+Names reserved for individual users:
+
+* The directory `$GIT_DIR/my`
+* Environment variables starting with `GIT_MY_`
+* Configuration section `my`
+* Files or directories in `$GIT_DIR/hooks` starting with `my_`
+* Attributes starting with `my_`
+
+Names reserved for individual repos:
+
+* The directory `$GIT_DIR/this`
+* Environment variables starting with `GIT_THIS_`
+* Configuration section `this`
+* Files or directories in `$GIT_DIR/hooks` starting with `this_`
+* Attributes starting with `this_`
+
+Names reserved for the lowest level group of people:
+
+* The directory `$GIT_DIR/our`
+* Environment variables starting with `GIT_OUR_`
+* Configuration section `our`
+* Files or directories in `$GIT_DIR/hooks` starting with `our_`
+* Attributes starting with `our_`
+
+Names reserved for larger groups of people, for companies,
+or for extensions that are distributed outside of the originating group:
+
+$ID is defined as a reverse DNS-style name, with dots replaced by
+underscores (preferably) or by hyphens (if necessary).  The $ID
+can have as many sections as possible, thus `com.example.sitename.projectid`
+is perfectly reasonable.  Use of a name based on a domain you control is
+highly recommended; if you do not control a domain, constructing the base of $ID
+from your email address is a reasonable alternative, but use double delimiters
+in place of the @ sign; for example: `com.example--root.project`
+
+* The directory $GIT_DIR/$ID
+* Environment variables starting with `GIT__$ID_` (note two underscores)
+* Configuration section `GIT--$ID`
+* Files or directories in `$GIT_DIR/hooks` starting with $ID
+* Attributes starting with `git__` (note two underscores)
+
+Aliases
+~~~~~~~
+Aliases are a special case.  Users need to type them so they should be
+short, but there is no way to prevent such short names from colliding.
+So the documentation or installer should construct something like:
+
+  [alias]
+     test = !git my-test
+     my-test = !echo made it
+
+while detecting collisions for the short name.  Then users or local
+policy can deal with collisions on the short name.
+
+This is not meant to cover every possible use case - a policy that
+detailed would be ignored and thus of no use.  Please play nicely.
Signature · 1 line
2.17.1

Regards
Abhishek

#9 lore raw

Re: [RFC PATCH 3/6] Add namespace collision avoidance guidelines file

Quoted 12 lines · Abhishek Kumar

Hello Kenneth,

Quoted 5 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

Quoted 6 lines
Quoted 2 lines

---

Since most users (including me) have never faced a namespace collision with Git before, you might have to make a stronger case for why this adding namespace collisions to documentation is important.

(This will be addressed in a followup email to a reply later in my inbox.)

Quoted 3 lines

I honestly don't have enough knowledge of Git internals to talk about any changes to the guidelines itself.

Fair enough.

Quoted 17 lines
Quoted 17 lines

Documentation/gitrepository-layout.txt | 1 +
.../technical/namespace-collisions.txt | 86 +++++++++++++++++++

2 files changed, 87 insertions(+)

create mode 100644 Documentation/technical/namespace-collisions.txt

Documentation/gitrepository-layout.txt +0 -0
index 1a2ef4c150..a84a4df513 100644
@@ -290,6 +290,7 @@ worktrees/<id>/locked::

worktrees/<id>/config.worktree::
Working directory specific configuration file.

+include::technical/namespace-collisions.txt[]
include::technical/repository-version.txt[]

Quoted 15 lines

Documentation/technical/namespace-collisions.txt line 5

Quoted 12 lines

SEE ALSO

Documentation/technical/namespace-collisions.txt new file +5 -0
new file mode 100644
index 0000000000..fb79c82a73
@@ -0,0 +1,86 @@
+gitattributes
+
+
+NAMESPACE COLLISIONS
+--------------------

A convention I have noticed is that "========" is for the document header and "--------" is for section headers.

At the moment at least this is not a stand-alone document, it is included as a section in gitrepository-layout.txt. (See patch 4.) It's a separate file because I thought it likely someone would suggest putting the content elsewhere or, as you seem to have assumed, it could be a stand-alone document.

Quoted 80 lines
Quoted 80 lines
Documentation/technical/namespace-collisions.txt new file +79 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes
+
+In order to reduce the chance of collisions between names Git uses
+and those used by other entities (users, groups, and extension authors),
+the following are recommended best practices.
+
+Names reserved to Git:
+
+* file or directory names ending with `.lock`
+* file or directory names starting with `.git`
+* filenames in $GIT_DIR
+* directory names in $GIT_DIR unless allowed by a rule below
+* environment variables starting with `GIT_`
+* configuration file sections unless allowed by a rule below
+* file or directory names in `$GIT_DIR/hooks` unless allowed by a rule below
+* attributes unless allowed by a rule below
+
+
+Names reserved for individual users:
+
+* The directory `$GIT_DIR/my`
+* Environment variables starting with `GIT_MY_`
+* Configuration section `my`
+* Files or directories in `$GIT_DIR/hooks` starting with `my_`
+* Attributes starting with `my_`
+
+Names reserved for individual repos:
+
+* The directory `$GIT_DIR/this`
+* Environment variables starting with `GIT_THIS_`
+* Configuration section `this`
+* Files or directories in `$GIT_DIR/hooks` starting with `this_`
+* Attributes starting with `this_`
+
+Names reserved for the lowest level group of people:
+
+* The directory `$GIT_DIR/our`
+* Environment variables starting with `GIT_OUR_`
+* Configuration section `our`
+* Files or directories in `$GIT_DIR/hooks` starting with `our_`
+* Attributes starting with `our_`
+
+Names reserved for larger groups of people, for companies,
+or for extensions that are distributed outside of the originating group:
+
+$ID is defined as a reverse DNS-style name, with dots replaced by
+underscores (preferably) or by hyphens (if necessary).  The $ID
+can have as many sections as possible, thus `com.example.sitename.projectid`
+is perfectly reasonable.  Use of a name based on a domain you control is
+highly recommended; if you do not control a domain, constructing the base of $ID
+from your email address is a reasonable alternative, but use double delimiters
+in place of the @ sign; for example: `com.example--root.project`
+
+* The directory $GIT_DIR/$ID
+* Environment variables starting with `GIT__$ID_` (note two underscores)
+* Configuration section `GIT--$ID`
+* Files or directories in `$GIT_DIR/hooks` starting with $ID
+* Attributes starting with `git__` (note two underscores)
+
+Aliases
+~~~~~~~
+Aliases are a special case.  Users need to type them so they should be
+short, but there is no way to prevent such short names from colliding.
+So the documentation or installer should construct something like:
+
+  [alias]
+     test = !git my-test
+     my-test = !echo made it
+
+while detecting collisions for the short name.  Then users or local
+policy can deal with collisions on the short name.
+
Quoted 8 lines
Quoted 5 lines
Documentation/technical/namespace-collisions.txt new file +2 -0
+This is not meant to cover every possible use case - a policy that
+detailed would be ignored and thus of no use.  Please play nicely.
Signature · 1 line
2.17.1

Regards
Abhishek

Thanks,
Keni

#10 lore raw

Re: [RFC PATCH 3/6] Add namespace collision avoidance guidelines file

In reply to Kenneth Lorber
Quoted 4 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

Collisions with whom are you worried about?

Random $stuff the end users want to have the namespace that governs $stuff (where $stuff could be an environment variable, a file on the filesystem, refname in git, etc.)?

Random $stuff third-party tools want to add?

As far as git is concerned, all the files under $GIT_DIR are blackbox and off-limits from end users and third-party tools, so there is no collisions in "a file on the filesystem", but creating a ref may result in a creation of a file in $GIT_DIR/, and carving out a part of refs/* hierarchy for use by a third-party tool is a worthwhile goal. Just like "git bisect" uses refs/bisect/* for its own operation and wants to reserve the hierarchy from other tools and the end users, any third-party tool would want a similar carve-out. The same for configuration variables.

HOWEVER

I would rather not to see an arbitrary set of rules that are not battle-tested in the field added to our documentation.

Instead, my preference is to add a document that describes what namespaces (e.g. environment variable, reference, configuration varable) third-party tools may want carving out for themselves to raise awareness of writers of such tools, and tell them to talk to us on the list, saying "I plan to write a tool that wants to reserve refs/frotz/ hierarchy for its own use---comments?", so that people can respond with "I know a tool that already uses that hierarchy, so you'd need to come up with a different one" to save hassles of having to rename before it happens.

After gaining experience from such exchanges, we might come up a set of rules so that no collisions would be possible without any coordination, and then we could document those rules.

I do not think that is plausible to happen, but that is OK.

#11 lore raw

Re: [RFC PATCH 3/6] Add namespace collision avoidance guidelines file

Quoted 12 lines · Junio C Hamano
Quoted 4 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

Collisions with whom are you worried about?

This patch came about when I went to split config for a server's repo into a static part and a dynamic part. The static part goes in a configuration repo (where it gets updated and pushed to production) while the dynamic part is written by the various git commands (and includes the static part). Several things came to mind:
- config doesn't have an extension, so adding a new name with the same extension doesn't work
- what files will the current git version put into .git? I don't know.
- how can I avoid picking names that will show up in future versions of git?

So the first answer is: collisions with git.

We also give our developers git extensions to help with our work flow. Some are aliases and some are hook scripts, with all the code living in .git/hooks (because that seemed the safest place); if git adds a new hook and I'm unlucky, all kinds of breakage are possible.

So the second answer is: collisions with organization or group extensions.

The third answer is theoretical: what happens if someone brings in a new git extension that collides with any of the above?

Quoted 8 lines

Random $stuff the end users want to have the namespace that governs $stuff (where $stuff could be an environment variable, a file on the filesystem, refname in git, etc.)?

Random $stuff third-party tools want to add?

As far as git is concerned, all the files under $GIT_DIR are blackbox and off-limits from end users

Where does it say that? I see this in the user manual: "cat .git/HEAD" so the user manual doesn't seem to press that point. Just looking for ".git" also shows:
"you may instead put them in a file in your repository named .git/info/exclude"
"touch proj.git/git-daemon-export-ok"
"$ cat >> .git/config <<EOF" (note that this can cause all sorts of grief since it doesn't lock config) (etc)

That's not true though, is it? config needs to be edited for all kinds of things, and while "git config -e" is probably the correct answer, a quick grep under Documentation shows zero hits for "config -e" and at least on place where the user manual says "by editing .git/config with a text editor". The hooks directory is also fair game for both users and extensions. (There's nothing mentioned about running more than one program from a hook, but that's an ugly bit of code I'm not likely to send out, so I'm going to ignore that conflict.)

Quoted 3 lines

and third-party tools, so
there is no collisions in "a file on the filesystem", but creating a ref may result in a creation of a file in $GIT_DIR/,

I wasn't aware of that, thanks. It also demonstrates the need to say more about this topic in the docs since I thought I had found all the conflict sources. (Got it - git help revisions, "1. If $GIT_DIR/<refname> exists, that is what you mean").

And here's a real (if contrived) oddity:

$ git init
$ echo a > file1
$ git add file1
$ git commit -m xx
$ echo b >> file1
$ git commit -F .git/HEAD file1
$ git reflog COMMIT_EDITMSG
6fd4d85 COMMIT_EDITMSG@{0}: commit: ref: refs/heads/master
213ef7d COMMIT_EDITMSG@{1}: commit (initial): xx
Quoted 11 lines

and carving out
a part of refs/* hierarchy for use by a third-party tool is a worthwhile goal. Just like "git bisect" uses refs/bisect/* for its own operation and wants to reserve the hierarchy from other tools and the end users, any third-party tool would want a similar carve-out. The same for configuration variables.

HOWEVER

I would rather not to see an arbitrary set of rules that are not battle-tested in the field added to our documentation.

I can't fault that, but I'd like to see more than what's there.

Quoted 10 lines

Instead, my preference is to add a document that describes what namespaces (e.g. environment variable, reference, configuration varable) third-party tools may want carving out for themselves to raise awareness of writers of such tools, and tell them to talk to us on the list, saying "I plan to write a tool that wants to reserve refs/frotz/ hierarchy for its own use---comments?", so that people can respond with "I know a tool that already uses that hierarchy, so you'd need to come up with a different one" to save hassles of having to rename before it happens.

I don't think that's reasonable. Individual users will not reach out to a mailing list to deal with their personal scripts - they'll just roll the dice. Large corporations or startups in stealth mode may also be unable or unwilling to expose enough of their internal information to get a good recommendation in public.

Quoted 4 lines

After gaining experience from such exchanges, we might come up a set of rules so that no collisions would be possible without any coordination, and then we could document those rules.

Would you be willing to support the "my" "this" and "our" levels while replacing the $ID section with a note for people expecting wide distribution of their extension to consult the mailing list?

Or even marking the entire section as "experimental - this may be updated as we gain experience with real world use; please consult the mailing list..." ?

Quoted 2 lines

I do not think that is plausible to happen, but that is OK.

I disagree, but then if I agreed I would not have submitted the patch :-)

Thanks for you comments,
Keni

#12 lore raw

RFC PATCH 4/6 Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt

In reply to Kenneth Lorber

From: Kenneth Lorber <[email protected]>

---
 Documentation/gitrepository-layout.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/gitrepository-layout.txt +2 -1
index a84a4df513..8050e8cc1f 100644
@@ -290,9 +290,10 @@ worktrees/<id>/locked::
 worktrees/<id>/config.worktree::
 	Working directory specific configuration file.
 
-include::technical/namespace-collisions.txt[]
 include::technical/repository-version.txt[]
 
+include::technical/namespace-collisions.txt[]
+
 SEE ALSO
 --------
 linkgit:git-init[1],
Signature · 1 line
2.17.1
#13 lore raw

Re: [RFC PATCH 4/6] Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt

Quoted 6 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

---
 Documentation/gitrepository-layout.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

As I said elsewhere, I am not sure if we want to even let third-party tools direct access at the filesystem level to $GIT_DIR/. We do want to say things like where the ref namespace that are taken as "per worktree" are located, so that a third-party tool wants to carve out a hierarchy out of the per-worktree part of the ref namespace, that may indirectly influence where on the filesystem under $GIT_DIR/ their stuff is stored, but how we decide to store refs inside $GIT_DIR/ should still be blackbox to these third-party tools (e.g. we may not be using loose or packed refs, but using a chain of reftable files).

So from that point of view, we shouldn't have to touch the repository layout document, I would think.

Quoted 16 lines
Documentation/gitrepository-layout.txt +2 -1
index a84a4df513..8050e8cc1f 100644
@@ -290,9 +290,10 @@ worktrees/<id>/locked::
 worktrees/<id>/config.worktree::
 	Working directory specific configuration file.
 
-include::technical/namespace-collisions.txt[]
 include::technical/repository-version.txt[]
 
+include::technical/namespace-collisions.txt[]
+
 SEE ALSO
 --------
 linkgit:git-init[1],
#14 lore raw

Re: [RFC PATCH 4/6] Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt

Quoted 13 lines · Junio C Hamano
Quoted 6 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

---
Documentation/gitrepository-layout.txt | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 10 lines

As I said elsewhere, I am not sure if we want to even let third-party tools direct access at the filesystem level to $GIT_DIR/. We do want to say things like where the ref namespace that are taken as "per worktree" are located, so that a third-party tool wants to carve out a hierarchy out of the per-worktree part of the ref namespace, that may indirectly influence where on the filesystem under $GIT_DIR/ their stuff is stored, but how we decide to store refs inside $GIT_DIR/ should still be blackbox to these third-party tools (e.g. we may not be using loose or packed refs, but using a chain of reftable files).

Probably true in the abstract, but the current situation is an undefined mix. Changing it is almost certainly more work than it's worth (my little game with COMMIT_EDITMSG notwithstanding), but documenting some safe places for end users seems reasonable to me.

Quoted 3 lines

So from that point of view, we shouldn't have to touch the repository layout document, I would think.

Where the information goes is certainly up for debate - that's why I put it in its own file. Any suggestions for a better place?

(It looks like I may not have backed up far enough when I cut this diff. I'll fix that for v2.)

Quoted 17 lines
Quoted 17 lines
Documentation/gitrepository-layout.txt +0 -0
index a84a4df513..8050e8cc1f 100644
@@ -290,9 +290,10 @@ worktrees/<id>/locked::

worktrees/<id>/config.worktree::
Working directory specific configuration file.

-include::technical/namespace-collisions.txt[]
include::technical/repository-version.txt[]

Documentation/gitrepository-layout.txt +2 -0
+include::technical/namespace-collisions.txt[]
+

SEE ALSO
--------
linkgit:git-init[1],

#15 lore raw

RFC PATCH 5/6 Tell config.txt about NAMESPACE COLLISIONS

In reply to Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a link to the NAMESPACE COLLISIONS information where git help config only mentioned the issue without supplying any guidance for how to do that.

---
 Documentation/config.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/config.txt +3 -1
index ef0768b91a..1e819c26f0 100644
@@ -310,7 +310,9 @@ in the appropriate manual page.
 Other git-related tools may and do use their own variables.  When
 inventing new variables for use in your own tool, make sure their
 names do not conflict with those that are used by Git itself and
-other popular tools, and describe them in your documentation.
+other popular tools, and describe them in your documentation.  See
+'NAMESPACE COLLISIONS' in linkgit:gitrepository-layout[5] for guidelines
+to prevent such conflicts.
 
 include::config/advice.txt[]
 
Signature · 1 line
2.17.1
#16 lore raw

Re: [RFC PATCH 5/6] Tell config.txt about NAMESPACE COLLISIONS

Quoted 15 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

Add a link to the NAMESPACE COLLISIONS information where git help config only mentioned the issue without supplying any guidance for how to do that.

---
 Documentation/config.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/config.txt +0 -0
index ef0768b91a..1e819c26f0 100644

Documentation/config.txt in the appropriate manual page. · line 315

Quoted 7 lines
Documentation/config.txt +3 -1
@@ -310,7 +310,9 @@ in the appropriate manual page.
 Other git-related tools may and do use their own variables.  When
 inventing new variables for use in your own tool, make sure their
 names do not conflict with those that are used by Git itself and
-other popular tools, and describe them in your documentation.
+other popular tools, and describe them in your documentation.  See
+'NAMESPACE COLLISIONS' in linkgit:gitrepository-layout[5] for guidelines
+to prevent such conflicts.

The configuration variable namespace is a shared resource, and it does make sense to give a provision for third-party tools to coordinate to avoid stepping on each others' toes.

The repository-layout document is about a physical on-filesystem structure that ought to be blackbox to third-party tools, so the link target may have to be different from what this patch wants to add, though.

I'd rather not to have such a document prematurely; if we were to add something to this paragraph (and I do think it is a good idea to say a bit more than "you're on your own but make sure you do not conflict with Git and other people" which is what we have there in the original), I'd just stop at telling readers to come here to the list to discuss and solicit input from other Git stakeholders.

Thanks.

#17 lore raw

RFC PATCH 6/6 Add NAMESPACE COLLISIONS reference to Hacking Git

In reply to Kenneth Lorber

From: Kenneth Lorber <[email protected]>

---
 Documentation/user-manual.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/user-manual.txt +1 -0
index 2144246444..4ceba4a943 100644
@@ -4056,6 +4056,7 @@ documents may be what you are really looking for:
 * hooks: linkgit:githooks[5]
 * attributes: linkgit:gitattributes[5]
 * new tools: linkgit:git-sh-setup[1]
+* avoiding namespace collisions: linkgit:gitrepository-layout[5]
 
 [[object-details]]
 === Object storage format
Signature · 1 line
2.17.1
#18 lore raw
In reply to Kenneth Lorber

Hello Kenneth,

Quoted 22 lines · Kenneth Lorber

From: Kenneth Lorber <[email protected]>

This started as an effort to understand this section of config.txt:
When inventing new variables for use in your own tool, make sure their names do not conflict with those that are used by Git itself and other popular tools, and describe them in your documentation.
and grew from there.

I don't expect this to be adopted as is, but I've found it much easier to discuss something concrete rather than an abstract "this is incomplete" or "this is hard to find."

Cut from master.

keni (6):
Tell the glossary about core.hooksPath
Add bit on extending git to Hacking Git
Add namespace collision avoidance guidelines file Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt Tell config.txt about NAMESPACE COLLISIONS
Add NAMESPACE COLLISIONS reference to Hacking Git

Quoted 11 lines
 Documentation/config.txt                      |  4 +-
 Documentation/gitrepository-layout.txt        |  2 +
 Documentation/glossary-content.txt            | 10 ++-
 .../technical/namespace-collisions.txt        | 86 +++++++++++++++++++
 Documentation/user-manual.txt                 |  9 ++
 5 files changed, 106 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Signature · 1 line
2.17.1

Some general notes about your patch series:

1. Conventionally, we prefix the first line with "area: " where the area is a filename or identifier for general area of the code being modified. It's customary to start the remainder of the first line after "area: " with a lower-case letter.

For example, your commit titles could have been:
- doc: tell the glossary about core.hooksPath
- doc: add bit on extending git to hacking Git

and so on.

Check out SubmittingPatches for more information.

2. We generally don't have a line like in our patches:

Quoted 1 line

From Kenneth Lorber <[email protected]>

Between the author information and the signed-off-by, it's redundant.

3. You could probably join the patches 3 to 6 together. Or maybe introduce namespace-collisions.txt in third patch and add references in all other files in a new, fourth patch.

Thanks for the contribution!

Regards
Abhishek

#19 lore raw
Quoted 7 lines · Abhishek Kumar

Some general notes about your patch series:

1. Conventionally, we prefix the first line with "area: " where the area is a filename or identifier for general area of the code being modified. It's customary to start the remainder of the first line after "area: " with a lower-case letter.

Quoted 7 lines

For example, your commit titles could have been:
- doc: tell the glossary about core.hooksPath
- doc: add bit on extending git to hacking Git

and so on.

Check out SubmittingPatches for more information.

Good suggestion.

Quoted 5 lines

2. We generally don't have a line like in our patches:

Quoted 1 line

From Kenneth Lorber <[email protected]>

Between the author information and the signed-off-by, it's redundant.

Carefully inspect the e-mail header and in-body header ;-)

The author identity must match the identity written for the signed-off-by trailer, so the in-body header becomes needed when the From: e-mail header does not match the true author, like these patches.

Quoted 3 lines

3. You could probably join the patches 3 to 6 together. Or maybe introduce namespace-collisions.txt in third patch and add references in all other files in a new, fourth patch.

Perhaps, but I'd rather not to see a rule that hasn't been applied even once in the real situation written down like a law. I'd prefer to see us gain experience by interacting tool authors on the list and learn what their concerns and pain-points are.

Thansk.

#20 lore raw
Quoted 27 lines · Junio C Hamano
Quoted 7 lines · Abhishek Kumar

Some general notes about your patch series:

1. Conventionally, we prefix the first line with "area: " where the area is a filename or identifier for general area of the code being modified. It's customary to start the remainder of the first line after "area: " with a lower-case letter.

Quoted 7 lines

For example, your commit titles could have been:
- doc: tell the glossary about core.hooksPath
- doc: add bit on extending git to hacking Git

and so on.

Check out SubmittingPatches for more information.

Good suggestion.

Quoted 4 lines

2. We generally don't have a line like in our patches:

Quoted 1 line

From Kenneth Lorber <[email protected]>

Quoted 8 lines
Quoted 1 line

Between the author information and the signed-off-by, it's redundant.

Carefully inspect the e-mail header and in-body header ;-)

The author identity must match the identity written for the signed-off-by trailer, so the in-body header becomes needed when the From: e-mail header does not match the true author, like these patches.

Email/git send-email configuration issue. They should match on v2, if I'm lucky.

Quoted 9 lines
Quoted 4 lines

3. You could probably join the patches 3 to 6 together. Or maybe introduce namespace-collisions.txt in third patch and add references in all other files in a new, fourth patch.

Perhaps, but I'd rather not to see a rule that hasn't been applied even once in the real situation written down like a law. I'd prefer to see us gain experience by interacting tool authors on the list and learn what their concerns and pain-points are.

This tool author/git admin went for a patch to discuss.

I assume from the above there has been no interaction before, so at the very least we need a pointer to the list for this topic to cause that interaction to occur.

As I noted in another part of this thread, we can certainly make it less of a law and more of a recommendation or hint.

I listed some of the issues elsewhere; if that isn't quite what you are looking for I can expand on it.

Quoted 2 lines

Thansk.

Thank you,
Keni

#21 lore raw
In reply to Abhishek Kumar
Quoted 5 lines · Abhishek Kumar

Hello Kenneth,

Hello. Thanks for taking the time to assist me. I am gradually working through all the replies.

Quoted 43 lines · Kenneth Lorber
Quoted 22 lines

From: Kenneth Lorber <[email protected]>

This started as an effort to understand this section of config.txt:
When inventing new variables for use in your own tool, make sure their names do not conflict with those that are used by Git itself and other popular tools, and describe them in your documentation.
and grew from there.

I don't expect this to be adopted as is, but I've found it much easier to discuss something concrete rather than an abstract "this is incomplete" or "this is hard to find."

Cut from master.

keni (6):
Tell the glossary about core.hooksPath
Add bit on extending git to Hacking Git
Add namespace collision avoidance guidelines file Include NAMESPACE COLLISIONS doc into gitrepository-layout.txt Tell config.txt about NAMESPACE COLLISIONS
Add NAMESPACE COLLISIONS reference to Hacking Git

Quoted 11 lines
Documentation/config.txt                      |  4 +-
Documentation/gitrepository-layout.txt        |  2 +
Documentation/glossary-content.txt            | 10 ++-
.../technical/namespace-collisions.txt        | 86 +++++++++++++++++++
Documentation/user-manual.txt                 |  9 ++
5 files changed, 106 insertions(+), 5 deletions(-)

create mode 100644 Documentation/technical/namespace-collisions.txt

Signature · 1 line
2.17.1

Some general notes about your patch series:

1. Conventionally, we prefix the first line with "area: " where the area is a filename or identifier for general area of the code being modified. It's customary to start the remainder of the first line after "area: " with a lower-case letter.

Quoted 7 lines

For example, your commit titles could have been:
- doc: tell the glossary about core.hooksPath
- doc: add bit on extending git to hacking Git

and so on.

Check out SubmittingPatches for more information.

Got it. I was working from MyFirstContribution.txt which says only:
"Start the commit with a 50-column or less subject line, including the name of the component you're working on". If this is a common mistake, perhaps I should take a shot at expanding this a bit?

Quoted 4 lines

2. We generally don't have a line like in our patches:

Quoted 1 line

From Kenneth Lorber <[email protected]>

That's odd. It's not in the raw 0000-cover-letter.patch file. In response to a comment in another email I've been tweaking both config sendemail.* and my system mailer config and I can't reproduce it (although I see it in a test message from a couple days ago). Hopefully that means it's fixed.

Quoted 6 lines

Between the author information and the signed-off-by, it's redundant.

3. You could probably join the patches 3 to 6 together. Or maybe introduce namespace-collisions.txt in third patch and add references in all other files in a new, fourth patch.

I split it out because 6 deepends on 3, but also conflicts with 2 if 3 is rejected. I have no objections to this change once the dust settles but I'd prefer not to reorganize things until then. If you feel strongly the other way I'll change it now.

Quoted 2 lines

Thanks for the contribution!

You're welcome.

Quoted 3 lines

Regards
Abhishek

#22 lore raw

v2 cover various documentation bits

In reply to Kenneth Lorber

Major changes since v1:
- add "doc:" prefix to subjects
- make guidelines file less authoritative; delete $ID concept and hopefully fix the conflict between my mailer and my git configuration which resulted in the extra From: line in the body.

Kenneth Lorber (6):
doc: Tell the glossary about core.hooksPath
doc: Add bit on extending git to Hacking Git
doc: Add namespace collision guidelines file
doc: Add collision doc to gitrepository-layout.txt
doc: Tell config.txt about namespace collisions
doc: Add collision reference to Hacking Git

 Documentation/config.txt                      |  4 +-
 Documentation/gitrepository-layout.txt        |  2 +
 Documentation/glossary-content.txt            | 10 +--
 .../technical/namespace-collisions.txt        | 72 +++++++++++++++++++
 Documentation/user-manual.txt                 |  9 +++
 5 files changed, 92 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Signature · 1 line
2.17.1
#23 lore raw

RFC PATCH v2 1/6 doc: Tell the glossary about core.hooksPath

The user manual glossary entry for hooks now knows about core.hooksPath.

---
 Documentation/glossary-content.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Documentation/glossary-content.txt +6 -4
index 090c888335..37147db1bc 100644
@@ -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
Signature · 1 line
2.17.1
#24 lore raw

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

Quoted 1 line · Kenneth Lorber

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.

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 209

Quoted 5 lines
Documentation/glossary-content.txt +1 -4
-	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?

Quoted 8 lines
Documentation/glossary-content.txt +5 -0
+	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
#25 lore raw

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

Quoted 8 lines · Junio C Hamano
Quoted 1 line · Kenneth Lorber

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

Quoted 7 lines

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.

Quoted 9 lines

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 209

Quoted 6 lines
Documentation/glossary-content.txt +1 -4
-	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.

Quoted 7 lines

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.

Quoted 9 lines
Quoted 9 lines
Documentation/glossary-content.txt +5 -0
+	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

#26 lore raw

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

Quoted 32 lines · Kenneth Lorber
Quoted 9 lines · Junio C Hamano
Quoted 1 line · Kenneth Lorber

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

Quoted 7 lines

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.

Quoted 9 lines

Documentation/glossary-content.txt for a more flexible and robust system to do the same thing. · line 209

Quoted 6 lines
Documentation/glossary-content.txt +1 -4
-	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.

Quoted 1 line

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/.

Quoted 22 lines
Quoted 8 lines

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.

Quoted 9 lines
Quoted 9 lines
Documentation/glossary-content.txt +5 -0
+	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

#27 lore raw

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

In reply to Kenneth Lorber
Quoted 9 lines · Kenneth Lorber
Quoted 6 lines

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.

#28 lore raw

RFC PATCH v2 2/6 doc: Add bit on extending git to Hacking Git

In reply to Kenneth Lorber

The Hacking Git section of the user manual is the logical place to look for information on extending Gut, so add a short section of links to places where that information actually lives.

---
 Documentation/user-manual.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/user-manual.txt +8 -0
index 833652983f..2144246444 100644
@@ -4049,6 +4049,14 @@ and that is what higher level `git merge -s resolve` is implemented with.
 This chapter covers internal details of the Git implementation which
 probably only Git developers need to understand.
 
+If you are extending Git using hooks, writing new tools, or otherwise
+looking for technical information but not hacking Git itself, the following
+documents may be what you are really looking for:
+
+* hooks: linkgit:githooks[5]
+* attributes: linkgit:gitattributes[5]
+* new tools: linkgit:git-sh-setup[1]
+
 [[object-details]]
 === Object storage format
 
Signature · 1 line
2.17.1
#29 lore raw

RFC PATCH v2 3/6 doc: Add namespace collision guidelines file

In reply to Kenneth Lorber

Add a file of guidelines to prevent the namespace collisions mentioned in git help config without any guidance.

---
 .../technical/namespace-collisions.txt        | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/technical/namespace-collisions.txt
Documentation/technical/namespace-collisions.txt new file +72 -0
new file mode 100644
index 0000000000..2a0cb312c5
@@ -0,0 +1,72 @@
+NAMESPACE COLLISIONS
+--------------------
+(Note that the recommendations in this section are under development
+and subject to change.  At this point they should be considered only
+suggestions.  If they do not work for your use case, or you are considering
+distributing your extension widely, please send a note to the mailing list.)
+
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes
+
+In order to reduce the chance of collisions between names Git uses
+and those used by other entities (users, groups, and extension authors),
+the following are recommended best practices.
+
+
+Names reserved to Git:
+
+* file or directory names ending with `.lock`
+* file or directory names starting with `.git`
+* filenames in $GIT_DIR
+* directory names in $GIT_DIR unless allowed by a rule below
+* environment variables starting with `GIT_`
+* configuration file sections unless allowed by a rule below
+* file or directory names in `$GIT_DIR/hooks` unless allowed by a rule below
+* attributes unless allowed by a rule below
+
+
+Names reserved for individual users:
+
+* The directory `$GIT_DIR/my`
+* Environment variables starting with `GIT_MY_`
+* Configuration section `my`
+* Files or directories in `$GIT_DIR/hooks` starting with `my_`
+* Attributes starting with `my_`
+
+Names reserved for individual repos:
+
+* The directory `$GIT_DIR/this`
+* Environment variables starting with `GIT_THIS_`
+* Configuration section `this`
+* Files or directories in `$GIT_DIR/hooks` starting with `this_`
+* Attributes starting with `this_`
+
+Names reserved for the lowest level group of people:
+
+* The directory `$GIT_DIR/our`
+* Environment variables starting with `GIT_OUR_`
+* Configuration section `our`
+* Files or directories in `$GIT_DIR/hooks` starting with `our_`
+* Attributes starting with `our_`
+
+Aliases
+~~~~~~~
+Aliases are a special case.  Users need to type them so they should be
+short, but there is no way to prevent such short names from colliding.
+So the documentation or installer should construct something like:
+
+  [alias]
+     test = !git my-test
+     my-test = !echo made it
+
+while detecting collisions for the short name.  Then users or local
+policy can deal with collisions on the short name.
+
+This is not meant to cover every possible use case - a policy that
+detailed would be ignored and thus of no use.  Please play nicely.
Signature · 1 line
2.17.1
#30 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

Documentation/technical/namespace-collisions.txt line 15

Quoted 8 lines · Kenneth Lorber
Documentation/technical/namespace-collisions.txt new file +8 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes

The names of the subcommands "git" can spawn is a shared resource. You can install "git-imerge" program in one of the directories on your $PATH and say "git imerge" to invoke the program.

Two third-party developers may have to coordinate to avoid giving the same name to their totally-unrelated tools, if they hope that both of their tools to be useful in the larger Git ecosystem.

Documentation/technical/namespace-collisions.txt line 19

Quoted 3 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+In order to reduce the chance of collisions between names Git uses
+and those used by other entities (users, groups, and extension authors),
+the following are recommended best practices.

OK.

Quoted 1 line

+Names reserved to Git:

s/to/by/ perhaps.

Documentation/technical/namespace-collisions.txt line 36

Quoted 3 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+Names reserved for individual users:
+
+* The directory `$GIT_DIR/my`

So an individual user is allowed to store anything in that directory, and "git" or any third-party tools won't care. OK.

Quoted 1 line

+* Environment variables starting with GIT_MY_

Likewise. But then the users can use MY_FOO_BLAH without GIT_ prefix in the first place, so there isn't much gain there. Downside for "git" and third-party tool authors is not so big (just the loss of a single prefix "_MY"), so perhaps it is OK.

Documentation/technical/namespace-collisions.txt line 40

Quoted 3 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+* Configuration section `my`
+* Files or directories in `$GIT_DIR/hooks` starting with `my_`
+* Attributes starting with `my_`

The last one does not make much sense. You have to forbid defining my_attributes in .gitattributes files that are tracked in-tree; otherwise I cannot work with you on the same project, because I cannot use my_attributes for my own purpose in that project. For the same reason, reserving attributes for individual repositories does not make much sense, either.

Documentation/technical/namespace-collisions.txt line 44

Quoted 3 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+Names reserved for individual repos:
+
+* The directory `$GIT_DIR/this`

It is unclear what it means to have $GIT_DIR/my and $GIT_DIR/this and how to choose which one of these two ought to be used for each occasion a user finds a need to store something in these places.

Quoted 1 line

+* Environment variables starting with GIT_THIS_

The utility of this one is dubious.

	$ export GIT_THIS_BLAH=value
	$ cd repo1 ; work work work
	$ cd ../repo2 ; work work work

Unless you arrange to reset GIT_THIS_* environment variable every time you visit a separate repository, it would not be pratical to use.

Quoted 1 line

+Names reserved for the lowest level group of people:

What's lowest level group of people?

Also, where did the guideline for third-party tools go?

At this point I need to say that this is not very well thought out (yet), or that this is not very well explained, or perhaps both, so I'll stop commenting on it for now.

Thanks.

#31 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

Quoted 15 lines · Junio C Hamano

Documentation/technical/namespace-collisions.txt line 15

Quoted 8 lines · Kenneth Lorber
Documentation/technical/namespace-collisions.txt new file +8 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes

The names of the subcommands "git" can spawn is a shared resource. You can install "git-imerge" program in one of the directories on your $PATH and say "git imerge" to invoke the program.

Quoted 3 lines

Two third-party developers may have to coordinate to avoid giving the same name to their totally-unrelated tools, if they hope that both of their tools to be useful in the larger Git ecosystem.

Also names of worktrees that are attached to a single repository. If a third-party tool wants to make it "easy" for its users by automatically taking a name to do its job (instead of forcing the users to come up with a name and giving it to the tool), the name must be chosen in such a way that it does not collide names in use and names the user (or other third-party tools) will pick in the future.

I (or others) may come up with other things that must be named and name collisions must be avoided. Even though I already said that I didn't think the "suggestions to avoid name collisions" given by the RFC PATCH are well done, I do think it is worth being aware of the problem space, and enumerating what kind of names are shared and limited resource is the first step to become so.

Thanks.

#32 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

Quoted 6 lines · Junio C Hamano
Quoted 2 lines

The names of the subcommands "git" can spawn is a shared resource.
...

Also names of worktrees that are attached to a single repository.
...

Quoted 6 lines

I (or others) may come up with other things that must be named and name collisions must be avoided. Even though I already said that I didn't think the "suggestions to avoid name collisions" given by the RFC PATCH are well done, I do think it is worth being aware of the problem space, and enumerating what kind of names are shared and limited resource is the first step to become so.

Here are a few more.

- The nickname of a remote, like 'origin'.
- A custom pretty format alias 'pretty.<name>'.
- Ref hierarchy name (next to refs/{heads,tags,remotes}).

All of these are defined in the configuration, and unlike attributes, they are never defined by in-tree tracked files, so we do not have to worry about "I use this name, and I want to make sure others do not use the same for different purpose."

But third-party tools may want to carve out a subnamespace for their own use, and there needs coordination among them so that they do not stomp on each other's toes, or collide with names the end-users would want to use.

#33 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

Quoted 17 lines · Junio C Hamano
Quoted 6 lines · Junio C Hamano
Quoted 2 lines

The names of the subcommands "git" can spawn is a shared resource.
...

Also names of worktrees that are attached to a single repository.
...

Quoted 6 lines

I (or others) may come up with other things that must be named and name collisions must be avoided. Even though I already said that I didn't think the "suggestions to avoid name collisions" given by the RFC PATCH are well done, I do think it is worth being aware of the problem space, and enumerating what kind of names are shared and limited resource is the first step to become so.

Here are a few more.

Quoted 8 lines

- The nickname of a remote, like 'origin'.
- A custom pretty format alias 'pretty.<name>'.
- Ref hierarchy name (next to refs/{heads,tags,remotes}).

All of these are defined in the configuration, and unlike attributes, they are never defined by in-tree tracked files, so we do not have to worry about "I use this name, and I want to make sure others do not use the same for different purpose."

Actually "git fetch --mirror" would propagate "private/custom" refnames used by the other side to anybody, so it does pose "I use this name, and my use of this name may harm others who may want to use it for other purposes" issue.

Quoted 4 lines

But third-party tools may want to carve out a subnamespace for their own use, and there needs coordination among them so that they do not stomp on each other's toes, or collide with names the end-users would want to use.

#34 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

In reply to Junio C Hamano
Quoted 25 lines · Junio C Hamano
Quoted 15 lines · Junio C Hamano

Documentation/technical/namespace-collisions.txt line 15

Quoted 8 lines · Kenneth Lorber
Documentation/technical/namespace-collisions.txt new file +8 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes

The names of the subcommands "git" can spawn is a shared resource. You can install "git-imerge" program in one of the directories on your $PATH and say "git imerge" to invoke the program.

Quoted 3 lines

Two third-party developers may have to coordinate to avoid giving the same name to their totally-unrelated tools, if they hope that both of their tools to be useful in the larger Git ecosystem.

Quoted 7 lines

Also names of worktrees that are attached to a single repository. If a third-party tool wants to make it "easy" for its users by automatically taking a name to do its job (instead of forcing the users to come up with a name and giving it to the tool), the name must be chosen in such a way that it does not collide names in use and names the user (or other third-party tools) will pick in the future.

One more, but only as an issue to be documented - you don't need to convince me that trying to handle this should simply be declared "left as an exercise for the reader" and that's extensions that require being compiled in to git (so file names, global variables, functions, test names, etc).

I'd propose "Do something similar to the above or ask for help on the list" if that's acceptable (where "above" is whatever the current proposal turns into).

Quoted 7 lines

I (or others) may come up with other things that must be named and name collisions must be avoided. Even though I already said that I didn't think the "suggestions to avoid name collisions" given by the RFC PATCH are well done, I do think it is worth being aware of the problem space, and enumerating what kind of names are shared and limited resource is the first step to become so.

Each message seems less enthusiastic than the last. I'm not sure I see any point in creating a v3 until I have time and inspiration to write something significantly different.

Quoted 2 lines

Thanks.

You're welcome.

PS - nothing to reply to in the next 2 messages from you. Saved them for v3.

#35 lore raw

Re: [RFC PATCH v2 3/6] doc: Add namespace collision guidelines file

In reply to Junio C Hamano
Quoted 19 lines · Junio C Hamano

Documentation/technical/namespace-collisions.txt line 15

Quoted 8 lines · Kenneth Lorber
Documentation/technical/namespace-collisions.txt new file +8 -0
+Git uses identifiers in a number of different namespaces:
+
+* environment variables
+* files in $GIT_DIR
+* files in the working trees
+* config sections
+* hooks
+* attributes

The names of the subcommands "git" can spawn is a shared resource. You can install "git-imerge" program in one of the directories on your $PATH and say "git imerge" to invoke the program.

Quoted 3 lines

Two third-party developers may have to coordinate to avoid giving the same name to their totally-unrelated tools, if they hope that both of their tools to be useful in the larger Git ecosystem.

So similar to the aliases case.

Quoted 10 lines

Documentation/technical/namespace-collisions.txt line 19

Quoted 4 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+In order to reduce the chance of collisions between names Git uses
+and those used by other entities (users, groups, and extension authors),
+the following are recommended best practices.

OK.

Quoted 1 line

+Names reserved to Git:

s/to/by/ perhaps.

I don't believe so. For example, under this proposal, the "my" items are reserved by Git for the user, while the items in this section are reserved to git itself.

s/to/for/ might be clearer?

Quoted 8 lines

Documentation/technical/namespace-collisions.txt line 36

Quoted 4 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+Names reserved for individual users:
+
+* The directory `$GIT_DIR/my`

So an individual user is allowed to store anything in that directory, and "git" or any third-party tools won't care. OK.

Quoted 6 lines
Quoted 1 line

+* Environment variables starting with GIT_MY_

Likewise. But then the users can use MY_FOO_BLAH without GIT_ prefix in the first place, so there isn't much gain there. Downside for "git" and third-party tool authors is not so big (just the loss of a single prefix "_MY"), so perhaps it is OK.

The environment variable namespace is a mess in general; subdividing something well known (GIT_) seemed safer then hoping for MY to be available.

Also, and this applies to some of the other cases below, one goal was to make the rules as simple and therefore as consistent as possible. So we reserve the same names everywhere we can - little cost, added simplicity.

Quoted 9 lines

Documentation/technical/namespace-collisions.txt line 40

Quoted 4 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+* Configuration section `my`
+* Files or directories in `$GIT_DIR/hooks` starting with `my_`
+* Attributes starting with `my_`

The last one does not make much sense. You have to forbid defining my_attributes in .gitattributes files that are tracked in-tree; otherwise I cannot work with you on the same project, because I cannot use my_attributes for my own purpose in that project.

Yes, but they can be useful in $HOME/.config/git/attributes.

Quoted 3 lines

For
the same reason, reserving attributes for individual repositories does not make much sense, either.

I may not be following you on this one. What about the use case of a filter written specifically for a project-specific file type? That would be a "this" attribute so it doesn't collide with anything else.

Quoted 8 lines

Documentation/technical/namespace-collisions.txt line 44

Quoted 4 lines
Documentation/technical/namespace-collisions.txt new file +3 -0
+Names reserved for individual repos:
+
+* The directory `$GIT_DIR/this`

It is unclear what it means to have $GIT_DIR/my and $GIT_DIR/this and how to choose which one of these two ought to be used for each occasion a user finds a need to store something in these places.

$GIT_DIR/my would be something a user installs to their local clone to do something they want personally (contrived example: it's a good place to put their non-standard editor's temp files so they don't have to touch the shared .gitignore files).

$GIT_DIR/this would be used for things that everyone working on that one repo needs, but only for that one repo.

More generally, I'm not hoping to guess every possible use case, I'm trying to specify a policy that can accommodate all possible use cases - so generality over specific justifications.

Quoted 5 lines
Quoted 2 lines

+* Environment variables starting with GIT_THIS_

The utility of this one is dubious.

Quoted 7 lines
	$ export GIT_THIS_BLAH=value
	$ cd repo1 ; work work work
	$ cd ../repo2 ; work work work

Unless you arrange to reset GIT_THIS_* environment variable every time you visit a separate repository, it would not be pratical to use.

If you only consider env vars being passed in from the user or shell initialization, I think you are correct. However they could be useful for passing information from one program to another. Passing information into a custom editor invoked from git commit might be a use case.

But again, being uniform is better than not.

Quoted 4 lines
Quoted 2 lines

+Names reserved for the lowest level group of people:

What's lowest level group of people?

Purposefully unspecified, but I can understand if I can't get away with that.

The lowest level group of people could be two people doing agile development, everyone with a particular supervisor, a college class, a family, a department. It's the last chance to be informal, before you either use the third-party guidelines or go to the mailing list to ask for help.

Which brings us to:

Quoted 2 lines

Also, where did the guideline for third-party tools go?

That was in response to a comment from Abhishek Kumar; it was a mistake on my part to take silence from both of you as agreement on my compromise (which involved dropping the third-party section).

I'll put it back if I get enough encouragement to cut a v3.

Quoted 6 lines

At this point I need to say that this is not very well thought out (yet), or that this is not very well explained, or perhaps both, so I'll stop commenting on it for now.

Thanks.

You're welcome. I've got 3 more emails from you to reply to but it may not happen today.

#36 lore raw

RFC PATCH v2 4/6 doc: Add collision doc to gitrepository-layout.txt

In reply to Kenneth Lorber
---
 Documentation/gitrepository-layout.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/gitrepository-layout.txt +2 -0
index 1a2ef4c150..8050e8cc1f 100644
@@ -292,6 +292,8 @@ worktrees/<id>/config.worktree::
 
 include::technical/repository-version.txt[]
 
+include::technical/namespace-collisions.txt[]
+
 SEE ALSO
 --------
 linkgit:git-init[1],
Signature · 1 line
2.17.1
#37 lore raw

RFC PATCH v2 5/6 doc: Tell config.txt about namespace collisions

In reply to Kenneth Lorber

Add a link to the namespace collisions information where git help config only mentioned the issue without supplying any guidance for how to do that.

---
 Documentation/config.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/config.txt +3 -1
index ef0768b91a..1e819c26f0 100644
@@ -310,7 +310,9 @@ in the appropriate manual page.
 Other git-related tools may and do use their own variables.  When
 inventing new variables for use in your own tool, make sure their
 names do not conflict with those that are used by Git itself and
-other popular tools, and describe them in your documentation.
+other popular tools, and describe them in your documentation.  See
+'NAMESPACE COLLISIONS' in linkgit:gitrepository-layout[5] for guidelines
+to prevent such conflicts.
 
 include::config/advice.txt[]
 
Signature · 1 line
2.17.1
#38 lore raw

RFC PATCH v2 6/6 doc: Add collision reference to Hacking Git

In reply to Kenneth Lorber
---
 Documentation/user-manual.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/user-manual.txt +1 -0
index 2144246444..4ceba4a943 100644
@@ -4056,6 +4056,7 @@ documents may be what you are really looking for:
 * hooks: linkgit:githooks[5]
 * attributes: linkgit:gitattributes[5]
 * new tools: linkgit:git-sh-setup[1]
+* avoiding namespace collisions: linkgit:gitrepository-layout[5]
 
 [[object-details]]
 === Object storage format
Signature · 1 line
2.17.1
#39 lore raw

cover update glossary hooks entry

In reply to Kenneth Lorber

Per Junio C Hamano, extract and split v2-0001-doc-Tell-the-glossary-about-core.hooksPath.patch
from the series starting with [RFC PATCH v2 0/6] various documentation bits.

Kenneth Lorber (2):
doc: Tell the glossary about core.hooksPath
doc: remove dated info and refs to sample hooks

 Documentation/glossary-content.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
#40 lore raw

RFC PATCH 1/2 doc: Tell the glossary about core.hooksPath

---
 Documentation/glossary-content.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/glossary-content.txt +5 -4
index 090c888335..a8490830ff 100644
@@ -206,10 +206,11 @@ 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 them executable.  See linkgit:githooks[5] for details.
 
 [[def_index]]index::
 	A collection of files with stat information, whose contents are stored
Signature · 1 line
2.17.1
#41 lore raw

RFC PATCH 2/2 doc: remove dated info and refs to sample hooks

In reply to Kenneth Lorber

In the glossary entry for hooks:
- don't discuss renaming the sample hooks
- don't discuss the need to make the sample hooks executable as the existing wording is too specific: it implies only the sample hooks need to be executable and the need to make scripts executable is already discussed near the top of hooks(5).

---
 Documentation/glossary-content.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/glossary-content.txt +2 -3
index a8490830ff..d96b25bef3 100644
@@ -208,9 +208,8 @@ for a more flexible and robust system to do the same thing.
 	and potentially aborted, and allow for a post-notification after the
 	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 them executable.  See linkgit:githooks[5] for details.
+	configuration variable.
+	See linkgit:githooks[5] for details.
 
 [[def_index]]index::
 	A collection of files with stat information, whose contents are stored
Signature · 1 line
2.17.1