Skip to content

Commit 76d4e07

Browse files
author
Junio C Hamano
committed
Merge branch 'master' into sp/mmap
* master: Documentation/config.txt (and repo-config manpage): mark-up fix. Teach Git how to parse standard power of 2 suffixes. Use /dev/null for update hook stdin. Redirect update hook stdout to stderr. Remove unnecessary argc parameter from run_command_v. Automatically detect a bare git repository. Replace "GIT_DIR" with GIT_DIR_ENVIRONMENT. Use PATH_MAX constant for --bare. Force core.filemode to false on Cygwin. Fix formatting for urls section of fetch, pull, and push manpages Fix yet another subtle xdl_merge() bug i18n: drop "encoding" header in the output after re-coding. commit-tree: cope with different ways "utf-8" can be spelled. Move commit reencoding parameter parsing to revision.c Documentation: minor rewording for git-log and git-show pages. Documentation: i18n commit log message notes. t3900: test log --encoding=none commit re-encoding: fix confusion between no and default conversion.
2 parents 2c039da + a862f97 commit 76d4e07

27 files changed

+321
-84
lines changed

Documentation/config.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ core.logAllRefUpdates::
8282
only when the file exists. If this configuration
8383
variable is set to true, missing "$GIT_DIR/logs/<ref>"
8484
file is automatically created for branch heads.
85-
86-
This information can be used to determine what commit
87-
was the tip of a branch "2 days ago".
88-
89-
This value is true by default in a repository that has
90-
a working directory associated with it, and false by
91-
default in a bare repository.
85+
+
86+
This information can be used to determine what commit
87+
was the tip of a branch "2 days ago".
88+
+
89+
This value is true by default in a repository that has
90+
a working directory associated with it, and false by
91+
default in a bare repository.
9292

9393
core.repositoryFormatVersion::
9494
Internal variable identifying the repository format and layout

Documentation/git-commit-tree.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ Your parents must have hated you!::
8181
Your sysadmin must hate you!::
8282
The password(5) name field is longer than a giant static buffer.
8383

84+
Discussion
85+
----------
86+
87+
include::i18n.txt[]
88+
8489
See Also
8590
--------
8691
gitlink:git-write-tree[1]

Documentation/git-commit.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ should be recorded as a single commit. In fact, the command
223223
refuses to run when given pathnames (but see `-i` option).
224224

225225

226+
DISCUSSION
227+
----------
228+
229+
include::i18n.txt[]
230+
226231
ENVIRONMENT VARIABLES
227232
---------------------
228233
The command specified by either the VISUAL or EDITOR environment

Documentation/git-log.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ include::pretty-formats.txt[]
3131
Limits the number of commits to show.
3232

3333
<since>..<until>::
34-
Show only commits between the named two commits.
34+
Show only commits between the named two commits. When
35+
either <since> or <until> is omitted, it defaults to
36+
`HEAD`, i.e. the tip of the current branch.
3537

3638
-p::
3739
Show the change the commit introduces in a patch form.
@@ -63,6 +65,12 @@ git log -r --name-status release..test::
6365
in the "release" branch, along with the list of paths
6466
each commit modifies.
6567

68+
Discussion
69+
----------
70+
71+
include::i18n.txt[]
72+
73+
6674
Author
6775
------
6876
Written by Linus Torvalds <torvalds@osdl.org>

Documentation/git-repo-config.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ OPTIONS
8787
git-repo-config will ensure that the output is "true" or "false"
8888

8989
--int::
90-
git-repo-config will ensure that the output is a simple decimal number
90+
git-repo-config will ensure that the output is a simple
91+
decimal number. An optional value suffix of 'k', 'm', or 'g'
92+
in the config file will cause the value to be multiplied
93+
by 1024, 1048576, or 1073741824 prior to output.
9194

9295

9396
ENVIRONMENT

Documentation/git-rev-list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ SYNOPSIS
2121
[ \--stdin ]
2222
[ \--topo-order ]
2323
[ \--parents ]
24+
[ \--encoding[=<encoding>] ]
2425
[ \--(author|committer|grep)=<pattern> ]
2526
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
2627
[ \--pretty | \--header ]

Documentation/git-show.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ This manual page describes only the most frequently used options.
3030

3131
OPTIONS
3232
-------
33-
<commitid>::
34-
ID of the commit to show.
33+
<object>::
34+
The name of the object to show.
3535

3636
include::pretty-formats.txt[]
3737

@@ -40,7 +40,8 @@ EXAMPLES
4040
--------
4141

4242
git show v1.0.0::
43-
Shows the tag `v1.0.0`.
43+
Shows the tag `v1.0.0`, along with the object the tags
44+
points at.
4445

4546
git show v1.0.0^{tree}::
4647
Shows the tree pointed to by the tag `v1.0.0`.
@@ -54,10 +55,16 @@ git show master:Makefile master:t/Makefile
5455
Concatenates the contents of said Makefiles in the head
5556
of the branch `master`.
5657

58+
Discussion
59+
----------
60+
61+
include::i18n.txt[]
62+
5763
Author
5864
------
5965
Written by Linus Torvalds <torvalds@osdl.org> and
60-
Junio C Hamano <junkio@cox.net>
66+
Junio C Hamano <junkio@cox.net>. Significantly enhanced by
67+
Johannes Schindelin <Johannes.Schindelin@gmx.de>.
6168

6269

6370
Documentation

Documentation/i18n.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
At the core level, git is character encoding agnostic.
2+
3+
- The pathnames recorded in the index and in the tree objects
4+
are treated as uninterpreted sequences of non-NUL bytes.
5+
What readdir(2) returns are what are recorded and compared
6+
with the data git keeps track of, which in turn are expected
7+
to be what lstat(2) and creat(2) accepts. There is no such
8+
thing as pathname encoding translation.
9+
10+
- The contents of the blob objects are uninterpreted sequence
11+
of bytes. There is no encoding translation at the core
12+
level.
13+
14+
- The commit log messages are uninterpreted sequence of non-NUL
15+
bytes.
16+
17+
Although we encourage that the commit log messages are encoded
18+
in UTF-8, both the core and git Porcelain are designed not to
19+
force UTF-8 on projects. If all participants of a particular
20+
project find it more convenient to use legacy encodings, git
21+
does not forbid it. However, there are a few things to keep in
22+
mind.
23+
24+
. `git-commit-tree` (hence, `git-commit` which uses it) issues
25+
an warning if the commit log message given to it does not look
26+
like a valid UTF-8 string, unless you explicitly say your
27+
project uses a legacy encoding. The way to say this is to
28+
have core.commitencoding in `.git/config` file, like this:
29+
+
30+
------------
31+
[core]
32+
commitencoding = ISO-8859-1
33+
------------
34+
+
35+
Commit objects created with the above setting record the value
36+
of `core.commitencoding` in its `encoding` header. This is to
37+
help other people who look at them later. Lack of this header
38+
implies that the commit log message is encoded in UTF-8.
39+
40+
. `git-log`, `git-show` and friends looks at the `encoding`
41+
header of a commit object, and tries to re-code the log
42+
message into UTF-8 unless otherwise specified. You can
43+
specify the desired output encoding with
44+
`core.logoutputencoding` in `.git/config` file, like this:
45+
+
46+
------------
47+
[core]
48+
logoutputencoding = ISO-8859-1
49+
------------
50+
+
51+
If you do not have this configuration variable, the value of
52+
`core.commitencoding` is used instead.
53+
54+
Note that we deliberately chose not to re-code the commit log
55+
message when a commit is made to force UTF-8 at the commit
56+
object level, because re-coding to UTF-8 is not necessarily a
57+
reversible operation.

Documentation/pretty-formats.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,10 @@ displayed in full, regardless of whether --abbrev or
7676
--no-abbrev are used, and 'parents' information show the
7777
true parent commits, without taking grafts nor history
7878
simplification into account.
79+
80+
--encoding[=<encoding>]::
81+
The commit objects record the encoding used for the log message
82+
in their encoding header; this option can be used to tell the
83+
command to re-code the commit log message in the encoding
84+
preferred by the user. For non plumbing commands this
85+
defaults to UTF-8.

Documentation/urls.txt

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ In addition to the above, as a short-hand, the name of a
4040
file in `$GIT_DIR/remotes` directory can be given; the
4141
named file should be in the following format:
4242

43-
URL: one of the above URL format
44-
Push: <refspec>
45-
Pull: <refspec>
43+
------------
44+
URL: one of the above URL format
45+
Push: <refspec>
46+
Pull: <refspec>
47+
------------
4648

4749
Then such a short-hand is specified in place of
4850
<repository> without <refspec> parameters on the command
@@ -54,10 +56,12 @@ be specified for additional branch mappings.
5456
Or, equivalently, in the `$GIT_DIR/config` (note the use
5557
of `fetch` instead of `Pull:`):
5658

59+
------------
5760
[remote "<remote>"]
5861
url = <url>
5962
push = <refspec>
6063
fetch = <refspec>
64+
------------
6165

6266
The name of a file in `$GIT_DIR/branches` directory can be
6367
specified as an older notation short-hand; the named
@@ -68,10 +72,15 @@ name of remote head (URL fragment notation).
6872
without the fragment is equivalent to have this in the
6973
corresponding file in the `$GIT_DIR/remotes/` directory.
7074

71-
URL: <url>
72-
Pull: refs/heads/master:<remote>
75+
------------
76+
URL: <url>
77+
Pull: refs/heads/master:<remote>
78+
------------
79+
7380

7481
while having `<url>#<head>` is equivalent to
7582

76-
URL: <url>
77-
Pull: refs/heads/<head>:<remote>
83+
------------
84+
URL: <url>
85+
Pull: refs/heads/<head>:<remote>
86+
------------

0 commit comments

Comments
 (0)