diff options
authorJunio C Hamano <>2013-03-25 20:46:42 (GMT)
committerJunio C Hamano <>2013-03-25 20:46:42 (GMT)
commitf7b1ad870c46c53685ef83efbfd7d9ca1983a191 (patch)
parent04fe1184fd0611bf26785b365dd344b8f7d72861 (diff)
parent7c1017d2d56112b88be2b6fa6d2a57a12ee2ffb4 (diff)
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
10 files changed, 64 insertions, 23 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 869d965..104579d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -195,8 +195,8 @@ any of those replacements occurred.
Show colored diff.
- The value must be `always` (the default for `<when>`), `never`, or `auto`.
- The default value is `never`.
+ `--color` (i.e. without '=<when>') is the same as `--color=always`.
+ '<when>' can be one of `always`, `never`, or `auto`.
It can be changed by the `color.ui` and `color.diff`
configuration settings.
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 32da244..3c81e85 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -81,8 +81,9 @@ OPTIONS
that points at object deadbee....).
--match <pattern>::
- Only consider tags matching the given pattern (can be used to avoid
- leaking private tags made from the repository).
+ Only consider tags matching the given `glob(7)` pattern,
+ excluding the "refs/tags/" prefix. This can be used to avoid
+ leaking private tags from the repository.
Show uniquely abbreviated commit object as fallback.
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index dfd12c9..e4c8e82 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -64,8 +64,11 @@ argument is always evaluated in the shell context using the 'eval' command
Prior to that, the $GIT_COMMIT environment variable will be set to contain
the id of the commit being rewritten. Also, GIT_AUTHOR_NAME,
-and GIT_COMMITTER_DATE are set according to the current commit. The values
-of these variables after the filters have run, are used for the new commit.
+and GIT_COMMITTER_DATE are taken from the current commit and exported to
+the environment, in order to affect the author and committer identities of
+the replacement commit created by linkgit:git-commit-tree[1] after the
+filters have run.
If any evaluation of <command> returns a non-zero exit status, the whole
operation will be aborted.
@@ -329,6 +332,26 @@ git filter-branch --msg-filter '
+The `--env-filter` option can be used to modify committer and/or author
+identity. For example, if you found out that your commits have the wrong
+identity due to a misconfigured, you can make a correction,
+before publishing the project, like this:
+git filter-branch --env-filter '
+ if test "$GIT_AUTHOR_EMAIL" = "root@localhost"
+ then
+ fi
+ if test "$GIT_COMMITTER_EMAIL" = "root@localhost"
+ then
+ fi
+' -- --all
To restrict rewriting to only part of the history, specify a revision
range in addition to the new branch name. The new branch name will
point to the top-most revision that a 'git rev-list' of this range
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 77a912d..c927758 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -145,7 +145,15 @@ you will need to handle the situation manually.
--index-version <n>::
Write the resulting index out in the named on-disk format version.
- The current default version is 2.
+ Supported versions are 2, 3 and 4. The current default version is 2
+ or 3, depending on whether extra features are used, such as
+ `git add -N`.
+Version 4 performs a simple pathname compression that reduces index
+size by 30%-50% on large repositories, which results in faster load
+time. Version 4 is relatively young (first released in in 1.8.0 in
+October 2012). Other Git implementations such as JGit and libgit2
+may not support it yet.
Only meaningful with `--stdin` or `--index-info`; paths are
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index eab9b35..dc6693f 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -140,9 +140,11 @@ the outcome of 'git commit'.
-This hook is called by 'git rebase' and can be used to prevent a branch
-from getting rebased.
+This hook is called by 'git rebase' and can be used to prevent a
+branch from getting rebased. The hook may be called with one or
+two parameters. The first parameter is the upstream from which
+the series was forked. The second parameter is the branch being
+rebased, and is not set when rebasing the current branch.
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 27c716b..0810251 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -12,7 +12,7 @@ Git index format
The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")
4-byte version number:
- The current supported versions are 2 and 3.
+ The current supported versions are 2, 3 and 4.
32-bit number of index entries.
@@ -93,8 +93,8 @@ Git index format
12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
is stored in this field.
- (Version 3) A 16-bit field, only applicable if the "extended flag"
- above is 1, split into (high to low bits).
+ (Version 3 or later) A 16-bit field, only applicable if the
+ "extended flag" above is 1, split into (high to low bits).
1-bit reserved for future
diff --git a/bundle.c b/bundle.c
index 8d12816..6210a6b 100644
--- a/bundle.c
+++ b/bundle.c
@@ -183,17 +183,17 @@ int verify_bundle(struct bundle_header *header, int verbose)
struct ref_list *r;
r = &header->references;
- printf_ln(Q_("The bundle contains %d ref",
- "The bundle contains %d refs",
+ printf_ln(Q_("The bundle contains this ref:",
+ "The bundle contains these %d refs:",
list_refs(r, 0, NULL);
+ r = &header->prerequisites;
if (!r->nr) {
printf_ln(_("The bundle records a complete history."));
} else {
- r = &header->prerequisites;
- printf_ln(Q_("The bundle requires this ref",
- "The bundle requires these %d refs",
+ printf_ln(Q_("The bundle requires this ref:",
+ "The bundle requires these %d refs:",
list_refs(r, 0, NULL);
diff --git a/daemon.c b/daemon.c
index 4602b46..df8c0ab 100644
--- a/daemon.c
+++ b/daemon.c
@@ -9,10 +9,6 @@
#define HOST_NAME_MAX 256
-#ifndef NI_MAXSERV
-#define NI_MAXSERV 32
#define initgroups(x, y) (0) /* nothing */
diff --git a/git-compat-util.h b/git-compat-util.h
index b636e0d..e715285 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -213,6 +213,17 @@ extern char *gitbasename(char *);
#include <openssl/err.h>
+/* On most systems <netdb.h> would have given us this, but
+ * not on some systems (e.g. z/OS).
+ */
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
/* On most systems <limits.h> would have given us this, but
* not on some systems (e.g. GNU/Hurd).
diff --git a/read-cache.c b/read-cache.c
index 827ae55..670a06b 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1260,7 +1260,7 @@ static int verify_hdr(struct cache_header *hdr, unsigned long size)
if (hdr->hdr_signature != htonl(CACHE_SIGNATURE))
return error("bad signature");
hdr_version = ntohl(hdr->hdr_version);
- if (hdr_version < 2 || 4 < hdr_version)
+ if (hdr_version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < hdr_version)
return error("bad index version %d", hdr_version);
git_SHA1_Update(&c, hdr, size - 20);