From e90436a8b30ea0a8fa8b6aecfd66f48f650a58e2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 22 Apr 2007 07:22:13 +0000 Subject: [PATCH] Autogenerated HTML docs for v1.5.1.2-242-g2d765 --- RelNotes-1.5.1.2.txt | 27 +- cmds-purehelpers.txt | 3 + config.txt | 13 + git-check-attr.html | 315 ++++++++++++++++++++++ git-check-attr.txt | 37 +++ git-config.html | 30 ++- git-index-pack.html | 12 +- git-index-pack.txt | 5 + git-pack-objects.html | 12 +- git-pack-objects.txt | 5 + git.html | 10 +- git.txt | 6 +- gitattributes.html | 596 ++++++++++++++++++++++++++++++++++++++++++ gitattributes.txt | 285 ++++++++++++++++++++ 14 files changed, 1344 insertions(+), 12 deletions(-) create mode 100644 git-check-attr.html create mode 100644 git-check-attr.txt create mode 100644 gitattributes.html create mode 100644 gitattributes.txt diff --git a/RelNotes-1.5.1.2.txt b/RelNotes-1.5.1.2.txt index f58268f6b..d88456306 100644 --- a/RelNotes-1.5.1.2.txt +++ b/RelNotes-1.5.1.2.txt @@ -1,4 +1,4 @@ -GIT v1.5.1.2 Release Notes (draft) +GIT v1.5.1.2 Release Notes ========================== Fixes since v1.5.1.1 @@ -6,6 +6,11 @@ Fixes since v1.5.1.1 * Bugfixes + - "git clone" over http from a repository that has lost the + loose refs by running "git pack-refs" were broken (a code to + deal with this was added to "git fetch" in v1.5.0, but it + was missing from "git clone"). + - "git diff a/ b/" incorrectly fell in "diff between two filesystem objects" codepath, when the user most likely wanted to limit the extent of output to two tracked @@ -24,14 +29,22 @@ Fixes since v1.5.1.1 - git-blame on a very long working tree path had buffer overrun problem. + - git-apply did not like to be fed two patches in a row that created + and then modified the same file. + + - git-svn was confused when a non-project was stored directly under + trunk/, branches/ and tags/. + + - git-svn wants the Error.pm module that was at least as new + as what we ship as part of git; install ours in our private + installation location if the one on the system is older. + + - An earlier update to command line integer parameter parser was + botched and made 'update-index --cacheinfo' completely useless. + + * Documentation updates - Various documentation updates from J. Bruce Fields, Frank Lichtenheld, Alex Riesen and others. Andrew Ruder started a war on undocumented options. - ---- -exec >/var/tmp/1 -O=v1.5.1.1-31-g0220f1e -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint diff --git a/cmds-purehelpers.txt b/cmds-purehelpers.txt index d0cc56904..05a2f38b9 100644 --- a/cmds-purehelpers.txt +++ b/cmds-purehelpers.txt @@ -1,6 +1,9 @@ gitlink:git-applypatch[1]:: Apply one patch extracted from an e-mail. +gitlink:git-check-attr[1]:: + Display gitattributes information.. + gitlink:git-check-ref-format[1]:: Make sure ref name is well formed. diff --git a/config.txt b/config.txt index 2c0a66632..b13ff3a1b 100644 --- a/config.txt +++ b/config.txt @@ -525,6 +525,19 @@ merge.verbosity:: conflicts, 2 outputs conflicts and file changes. Level 5 and above outputs debugging information. The default is level 2. +merge..name:: + Defines a human readable name for a custom low-level + merge driver. See gitlink:gitattributes[5] for details. + +merge..driver:: + Defines the command that implements a custom low-level + merge driver. See gitlink:gitattributes[5] for details. + +merge..recursive:: + Names a low-level merge driver to be used when + performing an internal merge between common ancestors. + See gitlink:gitattributes[5] for details. + pack.window:: The size of the window used by gitlink:git-pack-objects[1] when no window size is given on the command line. Defaults to 10. diff --git a/git-check-attr.html b/git-check-attr.html new file mode 100644 index 000000000..0dc323ecb --- /dev/null +++ b/git-check-attr.html @@ -0,0 +1,315 @@ + + + + + + +git-check-attr(1) + + + +

SYNOPSIS

+
+

git-check-attr attr… [--] pathname…

+
+

DESCRIPTION

+
+

For every pathname, this command will list if each attr is unspecified, +set, or unset as a gitattribute on that pathname.

+
+

OPTIONS

+
+
+
+-- +
+
+

+ Interpret all preceding arguments as attributes, and all following + arguments as path names. If not supplied, only the first argument will + be treated as an attribute. +

+
+
+
+

Author

+
+

Written by Junio C Hamano <junkio@cox.net>

+
+

Documentation

+
+

Documentation by James Bowes.

+
+

GIT

+
+

Part of the git(7) suite

+
+ + + diff --git a/git-check-attr.txt b/git-check-attr.txt new file mode 100644 index 000000000..ceb51959b --- /dev/null +++ b/git-check-attr.txt @@ -0,0 +1,37 @@ +git-check-attr(1) +================= + +NAME +---- +git-check-attr - Display gitattributes information. + + +SYNOPSIS +-------- +'git-check-attr' attr... [--] pathname... + +DESCRIPTION +----------- +For every pathname, this command will list if each attr is 'unspecified', +'set', or 'unset' as a gitattribute on that pathname. + +OPTIONS +------- +\--:: + Interpret all preceding arguments as attributes, and all following + arguments as path names. If not supplied, only the first argument will + be treated as an attribute. + + +Author +------ +Written by Junio C Hamano + +Documentation +-------------- +Documentation by James Bowes. + +GIT +--- +Part of the gitlink:git[7] suite + diff --git a/git-config.html b/git-config.html index 7ed664e53..2d6093b2f 100644 --- a/git-config.html +++ b/git-config.html @@ -1377,6 +1377,34 @@ merge.verbosity

+merge.<driver>.name +
+
+

+ Defines a human readable name for a custom low-level + merge driver. See gitattributes(5) for details. +

+
+
+merge.<driver>.driver +
+
+

+ Defines the command that implements a custom low-level + merge driver. See gitattributes(5) for details. +

+
+
+merge.<driver>.recursive +
+
+

+ Names a low-level merge driver to be used when + performing an internal merge between common ancestors. + See gitattributes(5) for details. +

+
+
pack.window
@@ -1617,7 +1645,7 @@ transfer.unpackLimit diff --git a/git-index-pack.html b/git-index-pack.html index 6d269d093..921f59527 100644 --- a/git-index-pack.html +++ b/git-index-pack.html @@ -361,6 +361,16 @@ objects/pack/ directory of a git repository.

locate any which have outlived their usefulness.

+
+--index-version=<version>[,<offset>] +
+
+

+ This is intended to be used by the test suite only. It allows + to force the version for the generated pack index, and to force + 64-bit index entries on objects located above the given offset. +

+

Note

@@ -386,7 +396,7 @@ mentioned above.

diff --git a/git-index-pack.txt b/git-index-pack.txt index 2229ee86b..b7a49b9f5 100644 --- a/git-index-pack.txt +++ b/git-index-pack.txt @@ -68,6 +68,11 @@ OPTIONS message can later be searched for within all .keep files to locate any which have outlived their usefulness. +--index-version=[,]:: + This is intended to be used by the test suite only. It allows + to force the version for the generated pack index, and to force + 64-bit index entries on objects located above the given offset. + Note ---- diff --git a/git-pack-objects.html b/git-pack-objects.html index 20170efd4..dc1fd8ef5 100644 --- a/git-pack-objects.html +++ b/git-pack-objects.html @@ -467,6 +467,16 @@ base-name packfile by 3-5 per-cent.

+
+--index-version=<version>[,<offset>] +
+
+

+ This is intended to be used by the test suite only. It allows + to force the version for the generated pack index, and to force + 64-bit index entries on objects located above the given offset. +

+

Author

@@ -489,7 +499,7 @@ base-name diff --git a/git-pack-objects.txt b/git-pack-objects.txt index fdc6f9728..d9e11c653 100644 --- a/git-pack-objects.txt +++ b/git-pack-objects.txt @@ -138,6 +138,11 @@ base-name:: length, this option typically shrinks the resulting packfile by 3-5 per-cent. +--index-version=[,]:: + This is intended to be used by the test suite only. It allows + to force the version for the generated pack index, and to force + 64-bit index entries on objects located above the given offset. + Author ------ diff --git a/git.html b/git.html index 9aa19ac03..e831d8a98 100644 --- a/git.html +++ b/git.html @@ -1368,6 +1368,14 @@ users typically do not use them directly.

+git-check-attr(1) +
+
+

+ Display gitattributes information.. +

+
+
git-check-ref-format(1)
@@ -2317,7 +2325,7 @@ contributors on the git-list <git@vger.kernel.org>.

diff --git a/git.txt b/git.txt index 9defc3327..ca1f78f79 100644 --- a/git.txt +++ b/git.txt @@ -37,7 +37,11 @@ Documentation for older releases are available here: * link:RelNotes-1.5.1.txt[release notes for 1.5.1] -* link:v1.5.0.7/git.html[documentation for release 1.5.0.7] +* link:v1.5.1.2/git.html[documentation for release 1.5.1.2] + +* link:RelNotes-1.5.1.2.txt[release notes for 1.5.1.2] + +* link:RelNotes-1.5.1.1.txt[release notes for 1.5.1.1] * link:RelNotes-1.5.0.7.txt[release notes for 1.5.0.7] diff --git a/gitattributes.html b/gitattributes.html new file mode 100644 index 000000000..071fab7fd --- /dev/null +++ b/gitattributes.html @@ -0,0 +1,596 @@ + + + + + + +gitattributes(5) + + + +

SYNOPSIS

+
+

$GIT_DIR/info/attributes, gitattributes

+
+

DESCRIPTION

+
+

A gitattributes file is a simple text file that gives +attributes to pathnames.

+

Each line in gitattributes file is of form:

+
+
+
glob    attr1 attr2 ...
+
+

That is, a glob pattern followed by an attributes list, +separated by whitespaces. When the glob pattern matches the +path in question, the attributes listed on the line are given to +the path.

+

Each attribute can be in one of these states for a given path:

+
+
+Set +
+
+

+ The path has the attribute with special value "true"; + this is specified by listing only the name of the + attribute in the attribute list. +

+
+
+Unset +
+
+

+ The path has the attribute with special value "false"; + this is specified by listing the name of the attribute + prefixed with a dash - in the attribute list. +

+
+
+Set to a value +
+
+

+ The path has the attribute with specified string value; + this is specified by listing the name of the attribute + followed by an equal sign = and its value in the + attribute list. +

+
+
+Unspecified +
+
+

+ No glob pattern matches the path, and nothing says if + the path has or does not have the attribute. +

+
+
+

When more than one glob pattern matches the path, a later line +overrides an earlier line.

+

When deciding what attributes are assigned to a path, git +consults $GIT_DIR/info/attributes file (which has the highest +precedence), .gitattributes file in the same directory as the +path in question, and its parent directories (the further the +directory that contains .gitattributes is from the path in +question, the lower its precedence).

+

Sometimes you would need to override an setting of an attribute +for a path to unspecified state. This can be done by listing +the name of the attribute prefixed with an exclamation point !.

+
+

EFFECTS

+
+

Certain operations by git can be influenced by assigning +particular attributes to a path. Currently, three operations +are attributes-aware.

+

Checking-out and checking-in

+

The attribute crlf affects how the contents stored in the +repository are copied to the working tree files when commands +such as git checkout and git merge run. It also affects how +git stores the contents you prepare in the working tree in the +repository upon git add and git commit.

+
+
+Set +
+
+

+ Setting the crlf attribute on a path is meant to mark + the path as a "text" file. core.autocrlf conversion + takes place without guessing the content type by + inspection. +

+
+
+Unset +
+
+

+ Unsetting the crlf attribute on a path is meant to + mark the path as a "binary" file. The path never goes + through line endings conversion upon checkin/checkout. +

+
+
+Unspecified +
+
+

+ Unspecified crlf attribute tells git to apply the + core.autocrlf conversion when the file content looks + like text. +

+
+
+Set to string value "input" +
+
+

+ This is similar to setting the attribute to true, but + also forces git to act as if core.autocrlf is set to + input for the path. +

+
+
+

Any other value set to crlf attribute is ignored and git acts +as if the attribute is left unspecified.

+

The core.autocrlf conversion

+

If the configuration variable core.autocrlf is false, no +conversion is done.

+

When core.autocrlf is true, it means that the platform wants +CRLF line endings for files in the working tree, and you want to +convert them back to the normal LF line endings when checking +in to the repository.

+

When core.autocrlf is set to "input", line endings are +converted to LF upon checkin, but there is no conversion done +upon checkout.

+

Generating diff text

+

The attribute diff affects if git diff generates textual +patch for the path or just says Binary files differ.

+
+
+Set +
+
+

+ A path to which the diff attribute is set is treated + as text, even when they contain byte values that + normally never appear in text files, such as NUL. +

+
+
+Unset +
+
+

+ A path to which the diff attribute is unset will + generate Binary files differ. +

+
+
+Unspecified +
+
+

+ A path to which the diff attribute is unspecified + first gets its contents inspected, and if it looks like + text, it is treated as text. Otherwise it would + generate Binary files differ. +

+
+
+

Any other value set to diff attribute is ignored and git acts +as if the attribute is left unspecified.

+

Performing a three-way merge

+

The attribute merge affects how three versions of a file is +merged when a file-level merge is necessary during git merge, +and other programs such as git revert and git cherry-pick.

+
+
+Set +
+
+

+ Built-in 3-way merge driver is used to merge the + contents in a way similar to merge command of RCS + suite. This is suitable for ordinary text files. +

+
+
+Unset +
+
+

+ Take the version from the current branch as the + tentative merge result, and declare that the merge has + conflicts. This is suitable for binary files that does + not have a well-defined merge semantics. +

+
+
+Unspecified +
+
+

+ By default, this uses the same built-in 3-way merge + driver as is the case the merge attribute is set. + However, merge.default configuration variable can name + different merge driver to be used for paths to which the + merge attribute is unspecified. +

+
+
+Any other string value +
+
+

+ 3-way merge is performed using the specified custom + merge driver. The built-in 3-way merge driver can be + explicitly specified by asking for "text" driver; the + built-in "take the current branch" driver can be + requested by "binary". +

+
+
+

Defining a custom merge driver

+

The definition of a merge driver is done in gitconfig not +gitattributes file, so strictly speaking this manual page is a +wrong place to talk about it. However…

+

To define a custom merge driver filfre, add a section to your +$GIT_DIR/config file (or $HOME/.gitconfig file) like this:

+
+
+
[merge "filfre"]
+        name = feel-free merge driver
+        driver = filfre %O %A %B
+        recursive = binary
+
+

The merge.*.name variable gives the driver a human-readable +name.

+

The merge.*.driver variable's value is used to construct a +command to run to merge ancestor's version (%O), current +version (%A) and the other branches' version (%B). These +three tokens are replaced with the names of temporary files that +hold the contents of these versions when the command line is +built.

+

The merge driver is expected to leave the result of the merge in +the file named with %A by overwriting it, and exit with zero +status if it managed to merge them cleanly, or non-zero if there +were conflicts.

+

The merge.*.recursive variable specifies what other merge +driver to use when the merge driver is called for an internal +merge between common ancestors, when there are more than one. +When left unspecified, the driver itself is used for both +internal merge and the final merge.

+
+

EXAMPLE

+
+

If you have these three gitattributes file:

+
+
+
(in $GIT_DIR/info/attributes)
+
+a*      foo !bar -baz
+
+(in .gitattributes)
+abc     foo bar baz
+
+(in t/.gitattributes)
+ab*     merge=filfre
+abc     -foo -bar
+*.c     frotz
+
+

the attributes given to path t/abc are computed as follows:

+
    +
  1. +

    +By examining t/.gitattributes (which is in the same + diretory as the path in question), git finds that the first + line matches. merge attribute is set. It also finds that + the second line matches, and attributes foo and bar + are unset. +

    +
  2. +
  3. +

    +Then it examines .gitattributes (which is in the parent + directory), and finds that the first line matches, but + t/.gitattributes file already decided how merge, foo + and bar attributes should be given to this path, so it + leaves foo and bar unset. Attribute baz is set. +

    +
  4. +
  5. +

    +Finally it examines $GIT_DIR/info/gitattributes. This file + is used to override the in-tree settings. The first line is + a match, and foo is set, bar is reverted to unspecified + state, and baz is unset. +

    +
  6. +
+

As the result, the attributes assignement to t/abc becomes:

+
+
+
foo     set to true
+bar     unspecified
+baz     set to false
+merge   set to string value "filfre"
+frotz   unspecified
+
+
+

GIT

+
+

Part of the git(7) suite

+
+ + + diff --git a/gitattributes.txt b/gitattributes.txt new file mode 100644 index 000000000..126871756 --- /dev/null +++ b/gitattributes.txt @@ -0,0 +1,285 @@ +gitattributes(5) +================ + +NAME +---- +gitattributes - defining attributes per path + +SYNOPSIS +-------- +$GIT_DIR/info/attributes, gitattributes + + +DESCRIPTION +----------- + +A `gitattributes` file is a simple text file that gives +`attributes` to pathnames. + +Each line in `gitattributes` file is of form: + + glob attr1 attr2 ... + +That is, a glob pattern followed by an attributes list, +separated by whitespaces. When the glob pattern matches the +path in question, the attributes listed on the line are given to +the path. + +Each attribute can be in one of these states for a given path: + +Set:: + + The path has the attribute with special value "true"; + this is specified by listing only the name of the + attribute in the attribute list. + +Unset:: + + The path has the attribute with special value "false"; + this is specified by listing the name of the attribute + prefixed with a dash `-` in the attribute list. + +Set to a value:: + + The path has the attribute with specified string value; + this is specified by listing the name of the attribute + followed by an equal sign `=` and its value in the + attribute list. + +Unspecified:: + + No glob pattern matches the path, and nothing says if + the path has or does not have the attribute. + +When more than one glob pattern matches the path, a later line +overrides an earlier line. + +When deciding what attributes are assigned to a path, git +consults `$GIT_DIR/info/attributes` file (which has the highest +precedence), `.gitattributes` file in the same directory as the +path in question, and its parent directories (the further the +directory that contains `.gitattributes` is from the path in +question, the lower its precedence). + +Sometimes you would need to override an setting of an attribute +for a path to `unspecified` state. This can be done by listing +the name of the attribute prefixed with an exclamation point `!`. + + +EFFECTS +------- + +Certain operations by git can be influenced by assigning +particular attributes to a path. Currently, three operations +are attributes-aware. + +Checking-out and checking-in +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The attribute `crlf` affects how the contents stored in the +repository are copied to the working tree files when commands +such as `git checkout` and `git merge` run. It also affects how +git stores the contents you prepare in the working tree in the +repository upon `git add` and `git commit`. + +Set:: + + Setting the `crlf` attribute on a path is meant to mark + the path as a "text" file. 'core.autocrlf' conversion + takes place without guessing the content type by + inspection. + +Unset:: + + Unsetting the `crlf` attribute on a path is meant to + mark the path as a "binary" file. The path never goes + through line endings conversion upon checkin/checkout. + +Unspecified:: + + Unspecified `crlf` attribute tells git to apply the + `core.autocrlf` conversion when the file content looks + like text. + +Set to string value "input":: + + This is similar to setting the attribute to `true`, but + also forces git to act as if `core.autocrlf` is set to + `input` for the path. + +Any other value set to `crlf` attribute is ignored and git acts +as if the attribute is left unspecified. + + +The `core.autocrlf` conversion +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If the configuration variable `core.autocrlf` is false, no +conversion is done. + +When `core.autocrlf` is true, it means that the platform wants +CRLF line endings for files in the working tree, and you want to +convert them back to the normal LF line endings when checking +in to the repository. + +When `core.autocrlf` is set to "input", line endings are +converted to LF upon checkin, but there is no conversion done +upon checkout. + + +Generating diff text +~~~~~~~~~~~~~~~~~~~~ + +The attribute `diff` affects if `git diff` generates textual +patch for the path or just says `Binary files differ`. + +Set:: + + A path to which the `diff` attribute is set is treated + as text, even when they contain byte values that + normally never appear in text files, such as NUL. + +Unset:: + + A path to which the `diff` attribute is unset will + generate `Binary files differ`. + +Unspecified:: + + A path to which the `diff` attribute is unspecified + first gets its contents inspected, and if it looks like + text, it is treated as text. Otherwise it would + generate `Binary files differ`. + +Any other value set to `diff` attribute is ignored and git acts +as if the attribute is left unspecified. + + +Performing a three-way merge +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The attribute `merge` affects how three versions of a file is +merged when a file-level merge is necessary during `git merge`, +and other programs such as `git revert` and `git cherry-pick`. + +Set:: + + Built-in 3-way merge driver is used to merge the + contents in a way similar to `merge` command of `RCS` + suite. This is suitable for ordinary text files. + +Unset:: + + Take the version from the current branch as the + tentative merge result, and declare that the merge has + conflicts. This is suitable for binary files that does + not have a well-defined merge semantics. + +Unspecified:: + + By default, this uses the same built-in 3-way merge + driver as is the case the `merge` attribute is set. + However, `merge.default` configuration variable can name + different merge driver to be used for paths to which the + `merge` attribute is unspecified. + +Any other string value:: + + 3-way merge is performed using the specified custom + merge driver. The built-in 3-way merge driver can be + explicitly specified by asking for "text" driver; the + built-in "take the current branch" driver can be + requested by "binary". + + +Defining a custom merge driver +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The definition of a merge driver is done in `gitconfig` not +`gitattributes` file, so strictly speaking this manual page is a +wrong place to talk about it. However... + +To define a custom merge driver `filfre`, add a section to your +`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this: + +---------------------------------------------------------------- +[merge "filfre"] + name = feel-free merge driver + driver = filfre %O %A %B + recursive = binary +---------------------------------------------------------------- + +The `merge.*.name` variable gives the driver a human-readable +name. + +The `merge.*.driver` variable's value is used to construct a +command to run to merge ancestor's version (`%O`), current +version (`%A`) and the other branches' version (`%B`). These +three tokens are replaced with the names of temporary files that +hold the contents of these versions when the command line is +built. + +The merge driver is expected to leave the result of the merge in +the file named with `%A` by overwriting it, and exit with zero +status if it managed to merge them cleanly, or non-zero if there +were conflicts. + +The `merge.*.recursive` variable specifies what other merge +driver to use when the merge driver is called for an internal +merge between common ancestors, when there are more than one. +When left unspecified, the driver itself is used for both +internal merge and the final merge. + + +EXAMPLE +------- + +If you have these three `gitattributes` file: + +---------------------------------------------------------------- +(in $GIT_DIR/info/attributes) + +a* foo !bar -baz + +(in .gitattributes) +abc foo bar baz + +(in t/.gitattributes) +ab* merge=filfre +abc -foo -bar +*.c frotz +---------------------------------------------------------------- + +the attributes given to path `t/abc` are computed as follows: + +1. By examining `t/.gitattributes` (which is in the same + diretory as the path in question), git finds that the first + line matches. `merge` attribute is set. It also finds that + the second line matches, and attributes `foo` and `bar` + are unset. + +2. Then it examines `.gitattributes` (which is in the parent + directory), and finds that the first line matches, but + `t/.gitattributes` file already decided how `merge`, `foo` + and `bar` attributes should be given to this path, so it + leaves `foo` and `bar` unset. Attribute `baz` is set. + +3. Finally it examines `$GIT_DIR/info/gitattributes`. This file + is used to override the in-tree settings. The first line is + a match, and `foo` is set, `bar` is reverted to unspecified + state, and `baz` is unset. + +As the result, the attributes assignement to `t/abc` becomes: + +---------------------------------------------------------------- +foo set to true +bar unspecified +baz set to false +merge set to string value "filfre" +frotz unspecified +---------------------------------------------------------------- + + +GIT +--- +Part of the gitlink:git[7] suite -- 2.26.2