Skip to content

Commit f7b1ad8

Browse files
committed
Merge branch 'maint-1.8.1' into maint
* maint-1.8.1: bundle: Add colons to list headings in "verify" bundle: Fix "verify" output if history is complete Documentation: filter-branch env-filter example git-filter-branch.txt: clarify ident variables usage git-compat-util.h: Provide missing netdb.h definitions describe: Document --match pattern format Documentation/githooks: Explain pre-rebase parameters update-index: list supported idx versions and their features diff-options: unconfuse description of --color read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr() index-format.txt: mention of v4 is missing in some places
2 parents 04fe118 + 7c1017d commit f7b1ad8

File tree

10 files changed

+64
-23
lines changed

10 files changed

+64
-23
lines changed

Documentation/diff-options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ any of those replacements occurred.
195195

196196
--color[=<when>]::
197197
Show colored diff.
198-
The value must be `always` (the default for `<when>`), `never`, or `auto`.
199-
The default value is `never`.
198+
`--color` (i.e. without '=<when>') is the same as `--color=always`.
199+
'<when>' can be one of `always`, `never`, or `auto`.
200200
ifdef::git-diff[]
201201
It can be changed by the `color.ui` and `color.diff`
202202
configuration settings.

Documentation/git-describe.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ OPTIONS
8181
that points at object deadbee....).
8282

8383
--match <pattern>::
84-
Only consider tags matching the given pattern (can be used to avoid
85-
leaking private tags made from the repository).
84+
Only consider tags matching the given `glob(7)` pattern,
85+
excluding the "refs/tags/" prefix. This can be used to avoid
86+
leaking private tags from the repository.
8687

8788
--always::
8889
Show uniquely abbreviated commit object as fallback.

Documentation/git-filter-branch.txt

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ argument is always evaluated in the shell context using the 'eval' command
6464
Prior to that, the $GIT_COMMIT environment variable will be set to contain
6565
the id of the commit being rewritten. Also, GIT_AUTHOR_NAME,
6666
GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL,
67-
and GIT_COMMITTER_DATE are set according to the current commit. The values
68-
of these variables after the filters have run, are used for the new commit.
67+
and GIT_COMMITTER_DATE are taken from the current commit and exported to
68+
the environment, in order to affect the author and committer identities of
69+
the replacement commit created by linkgit:git-commit-tree[1] after the
70+
filters have run.
71+
6972
If any evaluation of <command> returns a non-zero exit status, the whole
7073
operation will be aborted.
7174

@@ -329,6 +332,26 @@ git filter-branch --msg-filter '
329332
' HEAD~10..HEAD
330333
--------------------------------------------------------
331334

335+
The `--env-filter` option can be used to modify committer and/or author
336+
identity. For example, if you found out that your commits have the wrong
337+
identity due to a misconfigured user.email, you can make a correction,
338+
before publishing the project, like this:
339+
340+
--------------------------------------------------------
341+
git filter-branch --env-filter '
342+
if test "$GIT_AUTHOR_EMAIL" = "root@localhost"
343+
then
344+
345+
export GIT_AUTHOR_EMAIL
346+
fi
347+
if test "$GIT_COMMITTER_EMAIL" = "root@localhost"
348+
then
349+
350+
export GIT_COMMITTER_EMAIL
351+
fi
352+
' -- --all
353+
--------------------------------------------------------
354+
332355
To restrict rewriting to only part of the history, specify a revision
333356
range in addition to the new branch name. The new branch name will
334357
point to the top-most revision that a 'git rev-list' of this range

Documentation/git-update-index.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,15 @@ you will need to handle the situation manually.
145145

146146
--index-version <n>::
147147
Write the resulting index out in the named on-disk format version.
148-
The current default version is 2.
148+
Supported versions are 2, 3 and 4. The current default version is 2
149+
or 3, depending on whether extra features are used, such as
150+
`git add -N`.
151+
+
152+
Version 4 performs a simple pathname compression that reduces index
153+
size by 30%-50% on large repositories, which results in faster load
154+
time. Version 4 is relatively young (first released in in 1.8.0 in
155+
October 2012). Other Git implementations such as JGit and libgit2
156+
may not support it yet.
149157

150158
-z::
151159
Only meaningful with `--stdin` or `--index-info`; paths are

Documentation/githooks.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ the outcome of 'git commit'.
140140
pre-rebase
141141
~~~~~~~~~~
142142

143-
This hook is called by 'git rebase' and can be used to prevent a branch
144-
from getting rebased.
145-
143+
This hook is called by 'git rebase' and can be used to prevent a
144+
branch from getting rebased. The hook may be called with one or
145+
two parameters. The first parameter is the upstream from which
146+
the series was forked. The second parameter is the branch being
147+
rebased, and is not set when rebasing the current branch.
146148

147149
post-checkout
148150
~~~~~~~~~~~~~

Documentation/technical/index-format.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Git index format
1212
The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")
1313

1414
4-byte version number:
15-
The current supported versions are 2 and 3.
15+
The current supported versions are 2, 3 and 4.
1616

1717
32-bit number of index entries.
1818

@@ -93,8 +93,8 @@ Git index format
9393
12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
9494
is stored in this field.
9595

96-
(Version 3) A 16-bit field, only applicable if the "extended flag"
97-
above is 1, split into (high to low bits).
96+
(Version 3 or later) A 16-bit field, only applicable if the
97+
"extended flag" above is 1, split into (high to low bits).
9898

9999
1-bit reserved for future
100100

bundle.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ int verify_bundle(struct bundle_header *header, int verbose)
183183
struct ref_list *r;
184184

185185
r = &header->references;
186-
printf_ln(Q_("The bundle contains %d ref",
187-
"The bundle contains %d refs",
186+
printf_ln(Q_("The bundle contains this ref:",
187+
"The bundle contains these %d refs:",
188188
r->nr),
189189
r->nr);
190190
list_refs(r, 0, NULL);
191+
r = &header->prerequisites;
191192
if (!r->nr) {
192193
printf_ln(_("The bundle records a complete history."));
193194
} else {
194-
r = &header->prerequisites;
195-
printf_ln(Q_("The bundle requires this ref",
196-
"The bundle requires these %d refs",
195+
printf_ln(Q_("The bundle requires this ref:",
196+
"The bundle requires these %d refs:",
197197
r->nr),
198198
r->nr);
199199
list_refs(r, 0, NULL);

daemon.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#define HOST_NAME_MAX 256
1010
#endif
1111

12-
#ifndef NI_MAXSERV
13-
#define NI_MAXSERV 32
14-
#endif
15-
1612
#ifdef NO_INITGROUPS
1713
#define initgroups(x, y) (0) /* nothing */
1814
#endif

git-compat-util.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@ extern char *gitbasename(char *);
213213
#include <openssl/err.h>
214214
#endif
215215

216+
/* On most systems <netdb.h> would have given us this, but
217+
* not on some systems (e.g. z/OS).
218+
*/
219+
#ifndef NI_MAXHOST
220+
#define NI_MAXHOST 1025
221+
#endif
222+
223+
#ifndef NI_MAXSERV
224+
#define NI_MAXSERV 32
225+
#endif
226+
216227
/* On most systems <limits.h> would have given us this, but
217228
* not on some systems (e.g. GNU/Hurd).
218229
*/

read-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ static int verify_hdr(struct cache_header *hdr, unsigned long size)
12601260
if (hdr->hdr_signature != htonl(CACHE_SIGNATURE))
12611261
return error("bad signature");
12621262
hdr_version = ntohl(hdr->hdr_version);
1263-
if (hdr_version < 2 || 4 < hdr_version)
1263+
if (hdr_version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < hdr_version)
12641264
return error("bad index version %d", hdr_version);
12651265
git_SHA1_Init(&c);
12661266
git_SHA1_Update(&c, hdr, size - 20);

0 commit comments

Comments
 (0)