summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes/2.7.1.txt87
-rw-r--r--Documentation/fetch-options.txt9
-rw-r--r--Documentation/git-add.txt2
-rw-r--r--Documentation/git-am.txt1
-rw-r--r--Documentation/git-cherry-pick.txt1
-rw-r--r--Documentation/git-clone.txt9
-rw-r--r--Documentation/git-commit.txt6
-rw-r--r--Documentation/git-for-each-ref.txt15
-rw-r--r--Documentation/git-format-patch.txt1
-rw-r--r--Documentation/git-revert.txt1
-rw-r--r--Documentation/git-tag.txt2
-rw-r--r--Documentation/git-worktree.txt15
-rw-r--r--Documentation/git.txt3
-rw-r--r--Documentation/gitignore.txt23
-rw-r--r--Documentation/glossary-content.txt5
-rw-r--r--Documentation/user-manual.txt41
-rwxr-xr-xGIT-VERSION-GEN2
l---------RelNotes2
-rw-r--r--builtin/am.c3
-rw-r--r--builtin/clean.c26
-rw-r--r--builtin/commit.c2
-rw-r--r--builtin/diff.c2
-rw-r--r--builtin/fast-export.c2
-rw-r--r--builtin/fetch.c4
-rw-r--r--builtin/merge.c1
-rw-r--r--builtin/receive-pack.c3
-rw-r--r--builtin/tag.c4
-rw-r--r--cache.h22
-rw-r--r--compat/basename.c66
-rw-r--r--compat/bswap.h5
-rw-r--r--compat/mingw.c21
-rw-r--r--compat/mingw.h5
-rw-r--r--contrib/completion/git-completion.bash29
-rwxr-xr-xcontrib/subtree/git-subtree.sh12
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh60
-rw-r--r--diff-no-index.c7
-rw-r--r--diff.c14
-rw-r--r--diff.h6
-rw-r--r--dir.c80
-rw-r--r--environment.c2
-rw-r--r--git-compat-util.h11
-rwxr-xr-xgit-cvsserver.perl2
-rwxr-xr-xgit-filter-branch.sh2
-rwxr-xr-xgit-rebase.sh2
-rwxr-xr-xgit-send-email.perl9
-rwxr-xr-xgitweb/gitweb.perl2
-rw-r--r--path.c14
-rw-r--r--perl/Git/SVN/Ra.pm8
-rw-r--r--ref-filter.c26
-rw-r--r--reflog-walk.c16
-rw-r--r--refs/files-backend.c46
-rw-r--r--revision.c2
-rw-r--r--setup.c29
-rwxr-xr-xt/perf/p7300-clean.sh4
-rwxr-xr-xt/t0002-gitfile.sh2
-rwxr-xr-xt/t0060-path-utils.sh3
-rwxr-xr-xt/t1410-reflog.sh13
-rwxr-xr-xt/t3000-ls-files-others.sh7
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh25
-rwxr-xr-xt/t3203-branch-output.sh8
-rwxr-xr-xt/t4056-diff-order.sh6
-rwxr-xr-xt/t5510-fetch.sh13
-rwxr-xr-xt/t6023-merge-file.sh13
-rwxr-xr-xt/t6050-replace.sh10
-rwxr-xr-xt/t6300-for-each-ref.sh74
-rwxr-xr-xt/t7003-filter-branch.sh8
-rwxr-xr-xt/t7004-tag.sh8
-rwxr-xr-xt/t9001-send-email.sh15
-rw-r--r--t/test-lib.sh18
-rw-r--r--test-path-utils.c130
-rw-r--r--worktree.c8
-rw-r--r--wrapper.c13
-rw-r--r--xdiff/xmerge.c98
73 files changed, 887 insertions, 359 deletions
diff --git a/Documentation/RelNotes/2.7.1.txt b/Documentation/RelNotes/2.7.1.txt
new file mode 100644
index 0000000000..6553d69e33
--- /dev/null
+++ b/Documentation/RelNotes/2.7.1.txt
@@ -0,0 +1,87 @@
+Git v2.7.1 Release Notes
+========================
+
+Fixes since v2.7
+----------------
+
+ * An earlier change in 2.5.x-era broke users' hooks and aliases by
+ exporting GIT_WORK_TREE to point at the root of the working tree,
+ interfering when they tried to use a different working tree without
+ setting GIT_WORK_TREE environment themselves.
+
+ * The "exclude_list" structure has the usual "alloc, nr" pair of
+ fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
+ to reset 'alloc' to 0 when it cleared 'nr' to discard the managed
+ array.
+
+ * "git send-email" was confused by escaped quotes stored in the alias
+ files saved by "mutt", which has been corrected.
+
+ * A few unportable C construct have been spotted by clang compiler
+ and have been fixed.
+
+ * The documentation has been updated to hint the connection between
+ the '--signoff' option and DCO.
+
+ * "git reflog" incorrectly assumed that all objects that used to be
+ at the tip of a ref must be commits, which caused it to segfault.
+
+ * The ignore mechanism saw a few regressions around untracked file
+ listing and sparse checkout selection areas in 2.7.0; the change
+ that is responsible for the regression has been reverted.
+
+ * Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
+ (e.g. COMMIT_EDITMSG) that is meant to be left after the command is
+ done. This however did not work well if the repository is set to
+ be shared with core.sharedRepository and the umask of the previous
+ user is tighter. They have been made to work better by calling
+ unlink(2) and retrying after fopen(3) fails with EPERM.
+
+ * Asking gitweb for a nonexistent commit left a warning in the server
+ log.
+
+ * "git rebase", unlike all other callers of "gc --auto", did not
+ ignore the exit code from "gc --auto".
+
+ * Many codepaths that run "gc --auto" before exiting kept packfiles
+ mapped and left the file descriptors to them open, which was not
+ friendly to systems that cannot remove files that are open. They
+ now close the packs before doing so.
+
+ * A recent optimization to filter-branch in v2.7.0 introduced a
+ regression when --prune-empty filter is used, which has been
+ corrected.
+
+ * The description for SANITY prerequisite the test suite uses has
+ been clarified both in the comment and in the implementation.
+
+ * "git tag" started listing a tag "foo" as "tags/foo" when a branch
+ named "foo" exists in the same repository; remove this unnecessary
+ disambiguation, which is a regression introduced in v2.7.0.
+
+ * The way "git svn" uses auth parameter was broken by Subversion
+ 1.9.0 and later.
+
+ * The "split" subcommand of "git subtree" (in contrib/) incorrectly
+ skipped merges when it shouldn't, which was corrected.
+
+ * A few options of "git diff" did not work well when the command was
+ run from a subdirectory.
+
+ * dirname() emulation has been added, as Msys2 lacks it.
+
+ * The underlying machinery used by "ls-files -o" and other commands
+ have been taught not to create empty submodule ref cache for a
+ directory that is not a submodule. This removes a ton of wasted
+ CPU cycles.
+
+ * Drop a few old "todo" items by deciding that the change one of them
+ suggests is not such a good idea, and doing the change the other
+ one suggested to do.
+
+ * Documentation for "git fetch --depth" has been updated for clarity.
+
+ * The command line completion learned a handful of additional options
+ and command specific syntax.
+
+Also includes a handful of documentation and test updates.
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 45583d8454..78cd2653cd 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -8,10 +8,11 @@
option old data in `.git/FETCH_HEAD` will be overwritten.
--depth=<depth>::
- Deepen or shorten the history of a 'shallow' repository created by
- `git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
- to the specified number of commits from the tip of each remote
- branch history. Tags for the deepened commits are not fetched.
+ Limit fetching to the specified number of commits from the tip of
+ each remote branch history. If fetching to a 'shallow' repository
+ created by `git clone` with `--depth=<depth>` option (see
+ linkgit:git-clone[1]), deepen or shorten the history to the specified
+ number of commits. Tags for the deepened commits are not fetched.
--unshallow::
If the source repository is complete, convert a shallow
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index fe5282f130..6a96a669c2 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -24,7 +24,7 @@ remove paths that do not exist in the working tree anymore.
The "index" holds a snapshot of the content of the working tree, and it
is this snapshot that is taken as the contents of the next commit. Thus
-after making any changes to the working directory, and before running
+after making any changes to the working tree, and before running
the commit command, you must use the `add` command to add any new or
modified files to the index.
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 452c1feb23..13cdd7f3b6 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -35,6 +35,7 @@ OPTIONS
--signoff::
Add a `Signed-off-by:` line to the commit message, using
the committer identity of yourself.
+ See the signoff option in linkgit:git-commit[1] for more information.
-k::
--keep::
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 77da29a474..6154e57238 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -100,6 +100,7 @@ effect to your index in a row.
-s::
--signoff::
Add Signed-off-by line at the end of the commit message.
+ See the signoff option in linkgit:git-commit[1] for more information.
-S[<keyid>]::
--gpg-sign[=<keyid>]::
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 6bf000dac3..789b668f77 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -190,15 +190,14 @@ objects from the source repository into a pack in the cloned repository.
--depth <depth>::
Create a 'shallow' clone with a history truncated to the
- specified number of revisions.
+ specified number of commits. Implies `--single-branch` unless
+ `--no-single-branch` is given to fetch the histories near the
+ tips of all branches.
--[no-]single-branch::
Clone only the history leading to the tip of a single branch,
either specified by the `--branch` option or the primary
- branch remote's `HEAD` points at. When creating a shallow
- clone with the `--depth` option, this is the default, unless
- `--no-single-branch` is given to fetch the histories near the
- tips of all branches.
+ branch remote's `HEAD` points at.
Further fetches into the resulting repository will only update the
remote-tracking branch for the branch this option was used for the
initial cloning. If the HEAD at the remote did not point at any
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 7f34a5b331..9ec6b3cc17 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -154,7 +154,11 @@ OPTIONS
-s::
--signoff::
Add Signed-off-by line by the committer at the end of the commit
- log message.
+ log message. The meaning of a signoff depends on the project,
+ but it typically certifies that committer has
+ the rights to submit this work under the same license and
+ agrees to a Developer Certificate of Origin
+ (see http://developercertificate.org/ for more information).
-n::
--no-verify::
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index c6f073cea4..2e3e96f663 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -92,7 +92,11 @@ refname::
The name of the ref (the part after $GIT_DIR/).
For a non-ambiguous short name of the ref append `:short`.
The option core.warnAmbiguousRefs is used to select the strict
- abbreviation mode.
+ abbreviation mode. If `strip=<N>` is appended, strips `<N>`
+ slash-separated path components from the front of the refname
+ (e.g., `%(refname:strip=2)` turns `refs/tags/foo` into `foo`.
+ `<N>` must be a positive integer. If a displayed ref has fewer
+ components than `<N>`, the command aborts with an error.
objecttype::
The type of the object (`blob`, `tree`, `commit`, `tag`).
@@ -142,6 +146,11 @@ In addition to the above, for commit and tag objects, the header
field names (`tree`, `parent`, `object`, `type`, and `tag`) can
be used to specify the value in the header field.
+For commit and tag objects, the special `creatordate` and `creator`
+fields will correspond to the appropriate date or name-email-date tuple
+from the `committer` or `tagger` fields depending on the object type.
+These are intended for working on a mix of annotated and lightweight tags.
+
Fields that have name-email-date tuple as its value (`author`,
`committer`, and `tagger`) can be suffixed with `name`, `email`,
and `date` to extract the named component.
@@ -153,8 +162,8 @@ line is 'contents:body', where body is all of the lines after the first
blank line. The optional GPG signature is `contents:signature`. The
first `N` lines of the message is obtained using `contents:lines=N`.
-For sorting purposes, fields with numeric values sort in numeric
-order (`objectsize`, `authordate`, `committerdate`, `taggerdate`).
+For sorting purposes, fields with numeric values sort in numeric order
+(`objectsize`, `authordate`, `committerdate`, `creatordate`, `taggerdate`).
All other fields are used to sort in their byte-value order.
There is also an option to sort by versions, this can be done by using
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index e3cdaeb958..b149e09065 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -109,6 +109,7 @@ include::diff-options.txt[]
--signoff::
Add `Signed-off-by:` line to the commit message, using
the committer identity of yourself.
+ See the signoff option in linkgit:git-commit[1] for more information.
--stdout::
Print all commits to the standard output in mbox format,
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index b15139ffdc..573616a04a 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -89,6 +89,7 @@ effect to your index in a row.
-s::
--signoff::
Add Signed-off-by line at the end of the commit message.
+ See the signoff option in linkgit:git-commit[1] for more information.
--strategy=<strategy>::
Use the given merge strategy. Should only be used once.
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 7220e5eca1..abab4814ec 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -163,7 +163,7 @@ This option is only applicable when listing tags without annotation lines.
A string that interpolates `%(fieldname)` from the object
pointed at by a ref being shown. The format is the same as
that of linkgit:git-for-each-ref[1]. When unspecified,
- defaults to `%(refname:short)`.
+ defaults to `%(refname:strip=2)`.
--[no-]merged [<commit>]::
Only list tags whose tips are reachable, or not reachable
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 5b9ad0429c..62c76c1c89 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -32,11 +32,9 @@ The working tree's administrative files in the repository (see
`git worktree prune` in the main or any linked working tree to
clean up any stale administrative files.
-If you move a linked working tree to another file system, or
-within a file system that does not support hard links, you need to run
-at least one git command inside the linked working tree
-(e.g. `git status`) in order to update its administrative files in the
-repository so that they do not get automatically pruned.
+If you move a linked working tree, you need to manually update the
+administrative files so that they do not get pruned automatically. See
+section "DETAILS" for more information.
If a linked working tree is stored on a portable device or network share
which is not always mounted, you can prevent its administrative files from
@@ -137,6 +135,13 @@ thumb is do not make any assumption about whether a path belongs to
$GIT_DIR or $GIT_COMMON_DIR when you need to directly access something
inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path.
+If you move a linked working tree, you need to update the 'gitdir' file
+in the entry's directory. For example, if a linked working tree is moved
+to `/newpath/test-next` and its `.git` file points to
+`/path/main/.git/worktrees/test-next`, then update
+`/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
+instead.
+
To prevent a $GIT_DIR/worktrees entry from being pruned (which
can be useful in some situations, such as when the
entry's working tree is stored on a portable device), add a file named
diff --git a/Documentation/git.txt b/Documentation/git.txt
index bff6302c0d..d987ad20c9 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from the 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v2.7.0/git.html[documentation for release 2.7]
+* link:v2.7.1/git.html[documentation for release 2.7.1]
* release notes for
+ link:RelNotes/2.7.1.txt[2.7.1],
link:RelNotes/2.7.0.txt[2.7].
* link:v2.6.5/git.html[documentation for release 2.6.5]
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 79a1948a0b..473623d631 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -82,12 +82,12 @@ PATTERN FORMAT
- An optional prefix "`!`" which negates the pattern; any
matching file excluded by a previous pattern will become
- included again.
+ included again. It is not possible to re-include a file if a parent
+ directory of that file is excluded. Git doesn't list excluded
+ directories for performance reasons, so any patterns on contained
+ files have no effect, no matter where they are defined.
Put a backslash ("`\`") in front of the first "`!`" for patterns
that begin with a literal "`!`", for example, "`\!important!.txt`".
- It is possible to re-include a file if a parent directory of that
- file is excluded if certain conditions are met. See section NOTES
- for detail.
- If the pattern ends with a slash, it is removed for the
purpose of the following description, but it would only find
@@ -141,21 +141,6 @@ not tracked by Git remain untracked.
To stop tracking a file that is currently tracked, use
'git rm --cached'.
-To re-include files or directories when their parent directory is
-excluded, the following conditions must be met:
-
- - The rules to exclude a directory and re-include a subset back must
- be in the same .gitignore file.
-
- - The directory part in the re-include rules must be literal (i.e. no
- wildcards)
-
- - The rules to exclude the parent directory must not end with a
- trailing slash.
-
- - The rules to exclude the parent directory must have at least one
- slash.
-
EXAMPLES
--------
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index e225974253..cafc284359 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -531,6 +531,11 @@ The most notable example is `HEAD`.
"Secure Hash Algorithm 1"; a cryptographic hash function.
In the context of Git used as a synonym for <<def_object_name,object name>>.
+[[def_shallow_clone]]shallow clone::
+ Mostly a synonym to <<def_shallow_repository,shallow repository>>
+ but the phrase makes it more explicit that it was created by
+ running `git clone --depth=...` command.
+
[[def_shallow_repository]]shallow repository::
A shallow <<def_repository,repository>> has an