{"thread":{"id":"12886","subject":"[PATCH] Add notes that some $GIT_DIR/info/ files are not copied by clone, etc.","startedAt":"2008-03-27T04:36:58Z","lastAt":"2008-03-27T04:51:44Z","messageCount":2,"participants":["Toby Corkindale","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73182","messageId":"47EB246A.1030402@rea-group.com","threadId":"12886","inReplyTo":null,"subject":"[PATCH] Add notes that some $GIT_DIR/info/ files are not copied by clone, etc.","fromName":"Toby Corkindale","fromEmail":"toby.corkindale@rea-group.com","sentAt":"2008-03-27T04:36:58Z","receivedAt":"2008-03-27T04:36:58Z","isPatch":true,"sender":{"key":"toby.corkindale@rea-group.com","avatar":null},"body":"\n\n---\n Documentation/gitattributes.txt |    4 ++++\n Documentation/gitignore.txt     |    3 +++\n 2 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex 84ec962..b3b497b 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -63,6 +63,10 @@ path in question, and its parent directories (the further the\n directory that contains `.gitattributes` is from the path in\n question, the lower its precedence).\n \n+The $GIT_DIR/info/attributes file is used when you wish to only affect certain\n+repositories. It will not be copied to other repositories by automatic\n+operations such as clone, fetch, etc.\n+\n Sometimes you would need to override an setting of an attribute\n for a path to `unspecified` state.  This can be done by listing\n the name of the attribute prefixed with an exclamation point `!`.\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex e847b3b..435f23c 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -34,6 +34,9 @@ precedence, the last matching pattern decides the outcome):\n    files generated as part of the project build.\n \n  * Patterns read from `$GIT_DIR/info/exclude`.\n+ * The $GIT_DIR/info/exclude file is used when you wish to only affect\n+   certain repositories. It will not be copied to other repositories by\n+   automatic operations such as clone, fetch, etc.\n \n  * Patterns read from the file specified by the configuration\n    variable 'core.excludesfile'.\n-- \n1.5.4.3\n\n"},{"id":"73185","messageId":"20080327045144.GB6426@coredump.intra.peff.net","threadId":"12886","inReplyTo":"47EB246A.1030402@rea-group.com","subject":"Re: [PATCH] Add notes that some $GIT_DIR/info/ files are not copied by clone, etc.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-27T04:51:44Z","receivedAt":"2008-03-27T04:51:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 27, 2008 at 03:36:58PM +1100, Toby Corkindale wrote:\n\n> ---\n>  Documentation/gitattributes.txt |    4 ++++\n>  Documentation/gitignore.txt     |    3 +++\n>  2 files changed, 7 insertions(+), 0 deletions(-)\n\nGenerally git patches should be:\n\n  - included inline rather than attached (it looks like you are using\n    Thunderbird, which does have some whitespace munging issues; there\n    is a section in SubmittingPatches that discusses Thunderbird\n    specifically)\n\n  - signed-off (see SubmittingPatches)\n\nComments on the content are below.\n\n> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\n> index 84ec962..b3b497b 100644\n> --- a/Documentation/gitattributes.txt\n> +++ b/Documentation/gitattributes.txt\n> @@ -63,6 +63,10 @@ path in question, and its parent directories (the further the\n>  directory that contains `.gitattributes` is from the path in\n>  question, the lower its precedence).\n>  \n> +The $GIT_DIR/info/attributes file is used when you wish to only affect certain\n> +repositories. It will not be copied to other repositories by automatic\n> +operations such as clone, fetch, etc.\n> +\n\nI think this paragraph is OK, and in a reasonable spot. Though it might\nread easier for a user if it is inside-out from what you have written.\nIOW, you have \"X does Y\" but I wonder if \"if you want Y, then use X\"\nmight be a better wording. See below.\n\n> --- a/Documentation/gitignore.txt\n> +++ b/Documentation/gitignore.txt\n> @@ -34,6 +34,9 @@ precedence, the last matching pattern decides the outcome):\n>     files generated as part of the project build.\n>  \n>   * Patterns read from `$GIT_DIR/info/exclude`.\n> + * The $GIT_DIR/info/exclude file is used when you wish to only affect\n> +   certain repositories. It will not be copied to other repositories by\n> +   automatic operations such as clone, fetch, etc.\n>  \n>   * Patterns read from the file specified by the configuration\n>     variable 'core.excludesfile'.\n\nI don't like this one. There are actually _three_ different\nplaces you can put ignore patterns, so I think you do better to wait\nuntil after the precedence list is finished, and then discuss the\nreasons for using each. How about this instead of your second hunk?\n\n-- >8 --\nDocumentation: clarify differences between gitignore files\n\nSince gitignore patterns can be read from three different\nfiles, let's provide some hints to the user about how they\nare typically used.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/gitignore.txt |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex e847b3b..613dca0 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -38,6 +38,18 @@ precedence, the last matching pattern decides the outcome):\n  * Patterns read from the file specified by the configuration\n    variable 'core.excludesfile'.\n \n+Which file to place a pattern in depends on how the pattern is meant to\n+be used. Patterns which should be version-controlled and distributed to\n+other repositories via clone (i.e., files that all developers will want\n+to ignore) should go into a `.gitignore` file. Patterns which are\n+specific to a particular repository but which do not need to be shared\n+with other related repositories (e.g., auxiliary files that live inside\n+the repository but are specific to one user's workflow) should go into\n+the `$GIT_DIR/info/exclude` file.  Patterns which a user wants git to\n+ignore in all situations (e.g., backup or temporary files generated by\n+the user's editor of choice) generally go into a file specified by\n+`core.excludesfile` in the user's `~/.gitconfig`.\n+\n The underlying git plumbing tools, such as\n linkgit:git-ls-files[1] and linkgit:git-read-tree[1], read\n `gitignore` patterns specified by command-line options, or from\n-- \n1.5.5.rc1.133.g360d\n"}]}