summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes/2.0.1.txt115
-rw-r--r--Documentation/RelNotes/2.0.2.txt13
-rw-r--r--Documentation/config.txt8
-rw-r--r--Documentation/git-submodule.txt2
-rw-r--r--Documentation/git.txt3
-rw-r--r--Documentation/gitmodules.txt4
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile7
l---------RelNotes2
-rw-r--r--alloc.c23
-rw-r--r--builtin/annotate.c12
-rw-r--r--builtin/apply.c12
-rw-r--r--builtin/blame.c53
-rw-r--r--builtin/clean.c2
-rw-r--r--builtin/commit-tree.c4
-rw-r--r--builtin/commit.c27
-rw-r--r--builtin/fast-export.c5
-rw-r--r--builtin/fmt-merge-msg.c5
-rw-r--r--builtin/fsck.c3
-rw-r--r--builtin/gc.c26
-rw-r--r--builtin/grep.c3
-rw-r--r--builtin/index-pack.c39
-rw-r--r--builtin/log.c21
-rw-r--r--builtin/mailinfo.c6
-rw-r--r--builtin/merge.c8
-rw-r--r--builtin/mv.c3
-rw-r--r--builtin/remote.c37
-rw-r--r--builtin/repack.c14
-rw-r--r--builtin/rerere.c2
-rw-r--r--builtin/reset.c4
-rw-r--r--builtin/rev-list.c5
-rw-r--r--cache.h3
-rw-r--r--combine-diff.c3
-rw-r--r--commit-slab.h12
-rw-r--r--commit.c129
-rw-r--r--commit.h54
-rw-r--r--compat/mmap.c4
-rw-r--r--config.c2
-rw-r--r--config.mak.uname1
-rw-r--r--contrib/completion/git-completion.bash6
-rw-r--r--diff-lib.c33
-rw-r--r--diff.c3
-rw-r--r--dir.c34
-rw-r--r--fsck.c13
-rw-r--r--git-compat-util.h1
-rw-r--r--git-rebase--interactive.sh4
-rw-r--r--git-rebase--merge.sh5
-rwxr-xr-xgit-rebase.sh11
-rw-r--r--log-tree.c4
-rw-r--r--merge-recursive.c12
-rw-r--r--notes-cache.c6
-rw-r--r--notes-merge.c13
-rw-r--r--notes-utils.c7
-rw-r--r--notes-utils.h2
-rw-r--r--object.c4
-rw-r--r--pack-objects.c4
-rw-r--r--pager.c2
-rw-r--r--pretty.c59
-rw-r--r--read-cache.c47
-rw-r--r--refs.c21
-rw-r--r--refs.h3
-rw-r--r--revision.c22
-rw-r--r--sequencer.c49
-rw-r--r--sha1_file.c9
-rw-r--r--sha1_name.c18
-rw-r--r--sideband.c2
-rwxr-xr-xt/t0008-ignores.sh25
-rwxr-xr-xt/t1507-rev-parse-upstream.sh2
-rwxr-xr-xt/t3402-rebase-merge.sh15
-rwxr-xr-xt/t3420-rebase-autostash.sh15
-rwxr-xr-xt/t4039-diff-assume-unchanged.sh11
-rwxr-xr-xt/t4041-diff-submodule-option.sh7
-rwxr-xr-xt/t4107-apply-ignore-whitespace.sh12
-rwxr-xr-xt/t4201-shortlog.sh6
-rwxr-xr-xt/t4205-log-pretty-formats.sh217
-rwxr-xr-xt/t5538-push-shallow.sh59
-rwxr-xr-xt/t5542-push-http-shallow.sh100
-rwxr-xr-xt/t6006-rev-list-format.sh110
-rwxr-xr-xt/t6039-merge-ignorecase.sh53
-rwxr-xr-xt/t7007-show.sh10
-rwxr-xr-xt/t7102-reset.sh13
-rwxr-xr-xt/t7300-clean.sh4
-rwxr-xr-xt/t7500-commit.sh11
-rwxr-xr-xt/t7508-status.sh74
-rwxr-xr-xt/t7600-merge.sh11
-rwxr-xr-xt/t7700-repack.sh20
-rwxr-xr-xt/t8003-blame-corner-cases.sh9
-rw-r--r--wrapper.c38
-rw-r--r--wt-status.c12
89 files changed, 1420 insertions, 486 deletions
diff --git a/Documentation/RelNotes/2.0.1.txt b/Documentation/RelNotes/2.0.1.txt
new file mode 100644
index 0000000000..ce5579db3e
--- /dev/null
+++ b/Documentation/RelNotes/2.0.1.txt
@@ -0,0 +1,115 @@
+Git v2.0.1 Release Notes
+========================
+
+ * We used to unconditionally disable the pager in the pager process
+ we spawn to feed out output, but that prevented people who want to
+ run "less" within "less" from doing so.
+
+ * Tools that read diagnostic output in our standard error stream do
+ not want to see terminal control sequence (e.g. erase-to-eol).
+ Detect them by checking if the standard error stream is connected
+ to a tty.
+ * Reworded the error message given upon a failure to open an existing
+ loose object file due to e.g. permission issues; it was reported as
+ the object being corrupt, but that is not quite true.
+
+ * "git log -2master" is a common typo that shows two commits starting
+ from whichever random branch that is not 'master' that happens to
+ be checked out currently.
+
+ * The "%<(10,trunc)%s" pretty format specifier in the log family of
+ commands is used to truncate the string to a given length (e.g. 10
+ in the example) with padding to column-align the output, but did
+ not take into account that number of bytes and number of display
+ columns are different.
+
+ * The "mailmap.file" configuration option did not support the tilde
+ expansion (i.e. ~user/path and ~/path).
+
+ * The completion scripts (in contrib/) did not know about quite a few
+ options that are common between "git merge" and "git pull", and a
+ couple of options unique to "git merge".
+
+ * "--ignore-space-change" option of "git apply" ignored the spaces
+ at the beginning of line too aggressively, which is inconsistent
+ with the option of the same name "diff" and "git diff" have.
+
+ * "git blame" miscounted number of columns needed to show localized
+ timestamps, resulting in jaggy left-side-edge of the source code
+ lines in its output.
+
+ * "git blame" assigned the blame to the copy in the working-tree if
+ the repository is set to core.autocrlf=input and the file used CRLF
+ line endings.
+
+ * "git commit --allow-empty-message -C $commit" did not work when the
+ commit did not have any log message.
+
+ * "git diff --find-copies-harder" sometimes pretended as if the mode
+ bits have changed for paths that are marked with assume-unchanged
+ bit.
+
+ * "git format-patch" did not enforce the rule that the "--follow"
+ option from the log/diff family of commands must be used with
+ exactly one pathspec.
+
+ * "git gc --auto" was recently changed to run in the background to
+ give control back early to the end-user sitting in front of the
+ terminal, but it forgot that housekeeping involving reflogs should
+ be done without other processes competing for accesses to the refs.
+
+ * "git grep -O" to show the lines that hit in the pager did not work
+ well with case insensitive search. We now spawn "less" with its
+ "-I" option when it is used as the pager (which is the default).
+
+ * We used to disable threaded "git index-pack" on platforms without
+ thread-safe pread(); use a different workaround for such
+ platforms to allow threaded "git index-pack".
+
+ * The error reporting from "git index-pack" has been improved to
+ distinguish missing objects from type errors.
+
+ * "git mailinfo" used to read beyond the end of header string while
+ parsing an incoming e-mail message to extract the patch.
+
+ * On a case insensitive filesystem, merge-recursive incorrectly
+ deleted the file that is to be renamed to a name that is the same
+ except for case differences.
+
+ * "git pack-objects" unnecessarily copied the previous contents when
+ extending the hashtable, even though it will populate the table
+ from scratch anyway.
+
+ * "git rerere forget" did not work well when merge.conflictstyle
+ was set to a non-default value.
+
+ * "git remote rm" and "git remote prune" can involve removing many
+ refs at once, which is not a very efficient thing to do when very
+ many refs exist in the packed-refs file.
+
+ * "git log --exclude=<glob> --all | git shortlog" worked as expected,
+ but "git shortlog --exclude=<glob> --all", which is supposed to be
+ identical to the above pipeline, was not accepted at the command
+ line argument parser level.
+
+ * The autostash mode of "git rebase -i" did not restore the dirty
+ working tree state if the user aborted the interactive rebase by
+ emptying the insn sheet.
+
+ * "git show -s" (i.e. show log message only) used to incorrectly emit
+ an extra blank line after a merge commit.
+
+ * "git status", even though it is a read-only operation, tries to
+ update the index with refreshed lstat(2) info to optimize future
+ accesses to the working tree opportunistically, but this could
+ race with a "read-write" operation that modify the index while it
+ is running. Detect such a race and avoid overwriting the index.
+
+ * "git status" (and "git commit") behaved as if changes in a modified
+ submodule are not there if submodule.*.ignore configuration is set,
+ which was misleading. The configuration is only to unclutter diff
+ output during the course of development, and should not to hide
+ changes in the "status" output to cause the users forget to commit
+ them.
+
+ * The mode to run tests with HTTP server tests disabled was broken.
diff --git a/Documentation/RelNotes/2.0.2.txt b/Documentation/RelNotes/2.0.2.txt
new file mode 100644
index 0000000000..c48c0aab27
--- /dev/null
+++ b/Documentation/RelNotes/2.0.2.txt
@@ -0,0 +1,13 @@
+Git v2.0.2 Release Notes
+========================
+
+ * Documentation for "git submodule sync" forgot to say that the subcommand
+ can take the "--recursive" option.
+
+ * Mishandling of patterns in .gitignore that has trailing SPs quoted
+ with backslashes (e.g. ones that end with "\ ") have been
+ corrected.
+
+ * Recent updates to "git repack" started to duplicate objects that
+ are in packfiles marked with .keep flag into the new packfile by
+ mistake.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1932e9b9a2..c08286e968 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2293,7 +2293,9 @@ status.submodulesummary::
--summary-limit option of linkgit:git-submodule[1]). Please note
that the summary output command will be suppressed for all
submodules when `diff.ignoreSubmodules` is set to 'all' or only
- for those submodules where `submodule.<name>.ignore=all`. To
+ for those submodules where `submodule.<name>.ignore=all`. The only
+ exception to that rule is that status and commit will show staged
+ submodule changes. To
also view the summary for ignored submodules you can either use
the --ignore-submodules=dirty command line option or the 'git
submodule summary' command, which shows a similar output but does
@@ -2324,7 +2326,9 @@ submodule.<name>.fetchRecurseSubmodules::
submodule.<name>.ignore::
Defines under what circumstances "git status" and the diff family show
a submodule as modified. When set to "all", it will never be considered
- modified, "dirty" will ignore all changes to the submodules work tree and
+ modified (but it will nonetheless show up in the output of status and
+ commit when it has been staged), "dirty" will ignore all changes
+ to the submodules work tree and
takes only differences between the HEAD of the submodule and the commit
recorded in the superproject into account. "untracked" will additionally
let submodules with modified tracked files in their work tree show up.
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 89c4d3e394..8e6af65da0 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -20,7 +20,7 @@ SYNOPSIS
'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
[commit] [--] [<path>...]
'git submodule' [--quiet] foreach [--recursive] <command>
-'git submodule' [--quiet] sync [--] [<path>...]
+'git submodule' [--quiet] sync [--recursive] [--] [<path>...]
DESCRIPTION
diff --git a/Documentation/git.txt b/Documentation/git.txt
index b075e0bed5..3d9c6d1743 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v2.0.0/git.html[documentation for release 2.0]
+* link:v2.0.1/git.html[documentation for release 2.0.1]
* release notes for
+ link:RelNotes/2.0.1.txt[2.0.1],
link:RelNotes/2.0.0.txt[2.0.0].
* link:v1.9.4/git.html[documentation for release 1.9.4]
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 347a9f76ee..f6c0dfd029 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -67,7 +67,9 @@ submodule.<name>.fetchRecurseSubmodules::
submodule.<name>.ignore::
Defines under what circumstances "git status" and the diff family show
a submodule as modified. When set to "all", it will never be considered
- modified, "dirty" will ignore all changes to the submodules work tree and
+ modified (but will nonetheless show up in the output of status and
+ commit when it has been staged), "dirty" will ignore all changes
+ to the submodules work tree and
takes only differences between the HEAD of the submodule and the commit
recorded in the superproject into account. "untracked" will additionally
let submodules with modified tracked files in their work tree show up.
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 5d6dc5b4c6..0986062473 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.0.0
+DEF_VER=v2.0.1
LF='
'
diff --git a/Makefile b/Makefile
index a53f3a8326..e0caec3f67 100644
--- a/Makefile
+++ b/Makefile
@@ -183,9 +183,6 @@ all::
# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval
# This also implies NO_SETITIMER
#
-# Define NO_THREAD_SAFE_PREAD if your pread() implementation is not
-# thread-safe. (e.g. compat/pread.c or cygwin)
-#
# Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is
# generally faster on your platform than accessing the working directory.
#
@@ -1339,10 +1336,6 @@ endif
ifdef NO_PREAD
COMPAT_CFLAGS += -DNO_PREAD
COMPAT_OBJS += compat/pread.o
- NO_THREAD_SAFE_PREAD = YesPlease
-endif
-ifdef NO_THREAD_SAFE_PREAD
- BASIC_CFLAGS += -DNO_THREAD_SAFE_PREAD
endif
ifdef NO_FAST_WORKING_DIRECTORY
BASIC_CFLAGS += -DNO_FAST_WORKING_DIRECTORY
diff --git a/RelNotes b/RelNotes
index e50885caa1..7c4ae86d0f 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.0.0.txt \ No newline at end of file
+Documentation/RelNotes/2.0.2.txt \ No newline at end of file
diff --git a/alloc.c b/alloc.c
index f3ee745695..eb22a45c9d 100644
--- a/alloc.c
+++ b/alloc.c
@@ -47,23 +47,32 @@ union any_object {
DEFINE_ALLOCATOR(blob, struct blob)
DEFINE_ALLOCATOR(tree, struct tree)
-DEFINE_ALLOCATOR(commit, struct commit)
+DEFINE_ALLOCATOR(raw_commit, struct commit)
DEFINE_ALLOCATOR(tag, struct tag)
DEFINE_ALLOCATOR(object, union any_object)
+void *alloc_commit_node(void)
+{
+ static int commit_count;
+ struct commit *c = alloc_raw_commit_node();
+ c->index = commit_count++;
+ return c;
+}
+
static void report(const char *name, unsigned int count, size_t size)
{
fprintf(stderr, "%10s: %8u (%"PRIuMAX" kB)\n",
name, count, (uintmax_t) size);
}
-#define REPORT(name) \
- report(#name, name##_allocs, name##_allocs * sizeof(struct name) >> 10)
+#define REPORT(name, type) \
+ report(#name, name##_allocs, name##_allocs * sizeof(type) >> 10)
void alloc_report(void)
{
- REPORT(blob);
- REPORT(tree);
- REPORT(commit);
- REPORT(tag);
+ REPORT(blob, struct blob);
+ REPORT(tree, struct tree);
+ REPORT(raw_commit, struct commit);
+ REPORT(tag, struct tag);
+ REPORT(object, union any_object);
}
diff --git a/builtin/annotate.c b/builtin/annotate.c
index fc43eed36b..da413ae0d1 100644
--- a/builtin/annotate.c
+++ b/builtin/annotate.c