From e3b7705207b3e9c661026e43b95cfb2f40d7e6f2 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 3 Mar 2021 15:16:21 +0900 Subject: [PATCH] Imported Upstream version 2.15.0 --- .clang-format | 169 + Documentation/Makefile | 1 + Documentation/RelNotes/2.13.7.txt | 20 - Documentation/RelNotes/2.14.4.txt | 5 - Documentation/RelNotes/2.14.5.txt | 16 - Documentation/RelNotes/2.14.6.txt | 54 - Documentation/RelNotes/2.15.0.txt | 508 + Documentation/config.txt | 35 +- Documentation/diff-options.txt | 34 + Documentation/git-apply.txt | 4 +- Documentation/git-branch.txt | 24 +- Documentation/git-config.txt | 8 +- Documentation/git-cvsserver.txt | 2 +- Documentation/git-describe.txt | 24 +- Documentation/git-diff-index.txt | 6 +- Documentation/git-fast-import.txt | 15 - Documentation/git-filter-branch.txt | 28 +- Documentation/git-for-each-ref.txt | 8 +- Documentation/git-format-patch.txt | 4 + Documentation/git-grep.txt | 7 - Documentation/git-interpret-trailers.txt | 60 +- Documentation/git-merge.txt | 14 +- Documentation/git-push.txt | 4 +- Documentation/git-rebase.txt | 18 +- Documentation/git-rerere.txt | 2 +- Documentation/git-rev-parse.txt | 5 +- Documentation/git-rm.txt | 2 +- Documentation/git-send-pack.txt | 4 +- Documentation/git-svn.txt | 2 +- Documentation/git-update-index.txt | 2 +- Documentation/git.txt | 12 + Documentation/gitcore-tutorial.txt | 8 +- Documentation/githooks.txt | 15 +- Documentation/gitrepository-layout.txt | 2 +- Documentation/gittutorial.txt | 2 +- Documentation/merge-options.txt | 8 +- Documentation/pretty-formats.txt | 5 +- Documentation/rev-list-options.txt | 14 +- Documentation/technical/api-argv-array.txt | 2 +- Documentation/technical/api-config.txt | 2 +- Documentation/technical/api-ref-iteration.txt | 7 +- Documentation/technical/api-string-list.txt | 209 - Documentation/technical/api-tree-walking.txt | 6 +- .../technical/hash-function-transition.txt | 797 + Documentation/technical/pack-protocol.txt | 2 +- Documentation/technical/trivial-merge.txt | 4 +- Documentation/user-manual.txt | 12 +- GIT-VERSION-GEN | 2 +- Makefile | 35 +- RelNotes | 2 +- abspath.c | 4 + apply.c | 48 +- archive.c | 2 +- attr.c | 27 +- bisect.c | 21 +- branch.c | 19 +- builtin/add.c | 4 + builtin/am.c | 41 +- builtin/blame.c | 5 +- builtin/branch.c | 95 +- builtin/cat-file.c | 10 +- builtin/check-ref-format.c | 1 + builtin/checkout.c | 17 +- builtin/clean.c | 26 +- builtin/clone.c | 5 +- builtin/commit-tree.c | 4 +- builtin/commit.c | 50 +- builtin/config.c | 11 +- builtin/count-objects.c | 1 + builtin/describe.c | 40 +- builtin/diff-files.c | 1 - builtin/diff-index.c | 2 +- builtin/diff-tree.c | 1 - builtin/diff.c | 5 +- builtin/difftool.c | 39 +- builtin/fast-export.c | 3 +- builtin/fetch.c | 32 +- builtin/fsck.c | 18 +- builtin/gc.c | 9 +- builtin/get-tar-commit-id.c | 6 +- builtin/grep.c | 406 +- builtin/hash-object.c | 12 +- builtin/help.c | 5 +- builtin/index-pack.c | 5 +- builtin/init-db.c | 2 + builtin/interpret-trailers.c | 107 +- builtin/log.c | 27 +- builtin/ls-files.c | 7 +- builtin/merge-tree.c | 16 +- builtin/merge.c | 30 +- builtin/mv.c | 3 +- builtin/name-rev.c | 1 + builtin/notes.c | 3 +- builtin/pack-objects.c | 7 +- builtin/pack-redundant.c | 1 + builtin/prune-packed.c | 4 +- builtin/prune.c | 2 +- builtin/pull.c | 12 +- builtin/push.c | 2 +- builtin/read-tree.c | 2 - builtin/rebase--helper.c | 29 +- builtin/receive-pack.c | 13 +- builtin/reflog.c | 6 +- builtin/remote-ext.c | 2 +- builtin/remote.c | 13 +- builtin/replace.c | 6 +- builtin/reset.c | 41 +- builtin/rev-list.c | 2 +- builtin/rev-parse.c | 31 +- builtin/rm.c | 3 +- builtin/send-pack.c | 2 +- builtin/shortlog.c | 56 +- builtin/show-branch.c | 8 +- builtin/submodule--helper.c | 125 +- builtin/symbolic-ref.c | 3 +- builtin/tag.c | 11 +- builtin/unpack-file.c | 12 +- builtin/unpack-objects.c | 2 +- builtin/update-index.c | 48 +- builtin/update-ref.c | 69 +- builtin/verify-tag.c | 9 +- builtin/worktree.c | 26 +- bulk-checkin.c | 6 +- bundle.c | 9 +- cache-tree.c | 39 +- cache.h | 201 +- color.h | 2 + commit.c | 64 +- commit.h | 4 +- compat/mingw.c | 100 +- compat/mingw.h | 18 +- compat/regex/regex_internal.c | 4 +- compat/regex/regexec.c | 2 +- compat/win32/lazyload.h | 57 + config.c | 188 +- config.h | 20 +- config.mak.uname | 5 + connect.c | 6 +- connected.c | 1 + contrib/contacts/git-contacts | 2 +- contrib/examples/git-merge.sh | 4 +- contrib/examples/git-resolve.sh | 2 +- contrib/rerere-train.sh | 54 +- contrib/subtree/t/t7900-subtree.sh | 2 +- convert.c | 10 +- credential-cache--daemon.c | 5 +- csum-file.c | 2 +- diff-delta.c | 27 +- diff-lib.c | 3 +- diff.c | 1372 +- diff.h | 39 +- diffcore-rename.c | 4 +- dir.c | 47 +- entry.c | 103 +- environment.c | 11 +- fast-import.c | 40 +- fetch-pack.c | 3 +- fsck.c | 14 +- git-compat-util.h | 43 +- git-filter-branch.sh | 106 +- git-gui/po/README | 2 +- git-merge-octopus.sh | 2 +- git-p4.py | 2 +- git-rebase--am.sh | 1 + git-rebase--interactive.sh | 373 +- git-rebase.sh | 16 +- git-stash.sh | 11 +- git-submodule.sh | 11 - git.c | 6 +- gitweb/gitweb.perl | 3 + gpg-interface.c | 16 +- graph.c | 10 +- grep.c | 13 - grep.h | 1 - hash.h | 6 +- hashmap.c | 26 +- hashmap.h | 72 +- http-backend.c | 4 +- http-push.c | 2 + http-walker.c | 1 + http.c | 18 +- imap-send.c | 61 +- list.h | 38 + lockfile.c | 7 +- lockfile.h | 58 +- log-tree.c | 3 +- mailinfo.c | 11 +- mailmap.c | 6 +- merge-recursive.c | 78 +- merge-recursive.h | 3 +- name-hash.c | 32 +- notes-merge.c | 6 +- notes.c | 145 +- object.c | 13 + object.h | 8 + oidmap.c | 51 + oidmap.h | 68 + oidset.c | 36 +- oidset.h | 6 +- pack-bitmap-write.c | 4 +- pack-bitmap.c | 11 +- pack-check.c | 1 + pack-write.c | 7 +- packfile.c | 1901 +++ packfile.h | 138 + pager.c | 2 +- parse-options.c | 12 +- patch-ids.c | 14 +- path.c | 171 +- pathspec.c | 4 - pathspec.h | 7 + pkt-line.c | 2 +- po/TEAMS | 4 + po/bg.po | 4973 +++--- po/ca.po | 6128 +++---- po/de.po | 5078 +++--- po/es.po | 16599 +++++++++++++++++++ po/fr.po | 5039 +++--- po/git.pot | 4858 +++--- po/ko.po | 4946 +++--- po/ru.po | 4902 +++--- po/sv.po | 5152 +++--- po/vi.po | 5029 +++--- po/zh_CN.po | 4971 +++--- pretty.c | 49 +- progress.c | 15 +- progress.h | 3 +- quote.c | 1 + reachable.c | 3 + read-cache.c | 167 +- ref-filter.c | 46 +- reflog-walk.c | 6 +- refs.c | 215 +- refs.h | 38 +- refs/files-backend.c | 1101 +- refs/iterator.c | 47 +- refs/packed-backend.c | 1558 ++ refs/packed-backend.h | 26 + refs/ref-cache.c | 44 +- refs/ref-cache.h | 35 +- refs/refs-internal.h | 47 +- remote.c | 34 +- remote.h | 2 +- repository.c | 49 +- repository.h | 8 + rerere.c | 26 +- revision.c | 190 +- revision.h | 12 + send-pack.c | 7 +- sequencer.c | 603 +- sequencer.h | 8 + server-info.c | 1 + setup.c | 22 +- sha1-lookup.c | 4 +- sha1_file.c | 2526 +-- sha1_name.c | 243 +- sha1dc_git.c | 18 +- sha1dc_git.h | 28 +- shallow.c | 22 +- strbuf.h | 2 +- streaming.c | 1 + string-list.c | 2 +- string-list.h | 192 +- sub-process.c | 7 +- sub-process.h | 4 +- submodule-config.c | 172 +- submodule-config.h | 22 +- submodule.c | 470 +- submodule.h | 30 +- t/helper/.gitignore | 1 + t/helper/test-hashmap.c | 37 +- t/helper/test-line-buffer.c | 32 +- t/helper/test-parse-options.c | 2 + t/helper/test-path-utils.c | 133 - t/helper/test-run-command.c | 138 +- t/helper/test-submodule-config.c | 17 +- t/helper/test-write-cache.c | 23 + t/perf/p0007-write-cache.sh | 29 + t/t0040-parse-options.sh | 2 + t/t0060-path-utils.sh | 116 - t/t1004-read-tree-m-u-wf.sh | 2 +- t/t1014-read-tree-confusing.sh | 1 - t/t1200-tutorial.sh | 268 - t/t1400-update-ref.sh | 5 +- t/t1401-symbolic-ref.sh | 26 +- t/t1404-update-ref-errors.sh | 214 + t/t1407-worktree-ref-store.sh | 30 + t/t1408-packed-refs.sh | 42 + t/t1450-fsck.sh | 1 - t/t1500-rev-parse.sh | 15 + t/t1502-rev-parse-parseopt.sh | 112 +- t/t3200-branch.sh | 314 +- t/t3210-pack-refs.sh | 42 + t/t3308-notes-merge.sh | 2 +- t/t3404-rebase-interactive.sh | 22 +- t/t3415-rebase-autosquash.sh | 28 +- t/t3903-stash.sh | 34 + t/t3905-stash-include-untracked.sh | 17 + t/t4013-diff-various.sh | 12 + t/t4013/diff.diff-tree_--stat_initial_mode | 4 + t/t4013/diff.diff-tree_--summary_initial_mode | 3 + t/t4013/diff.diff-tree_initial_mode | 3 + t/t4013/diff.log_--decorate=full_--all | 6 + t/t4013/diff.log_--decorate_--all | 6 + t/t4015-diff-whitespace.sh | 573 +- t/t4027-diff-submodule.sh | 67 - t/t4059-diff-submodule-not-initialized.sh | 2 +- t/t4200-rerere.sh | 57 +- t/t4205-log-pretty-formats.sh | 51 +- t/t5304-prune.sh | 37 + t/t5520-pull.sh | 4 +- t/t5531-deep-submodule-push.sh | 10 + t/t5534-push-signed.sh | 7 + t/t5572-pull-submodule.sh | 32 + t/t6007-rev-list-cherry-pick-file.sh | 32 +- t/t6013-rev-list-reverse-parents.sh | 4 +- t/t6040-tracking-info.sh | 24 +- t/t6120-describe.sh | 83 + t/t6130-pathspec-noglob.sh | 1 - t/t6300-for-each-ref.sh | 90 +- t/t7001-mv.sh | 27 +- t/t7004-tag.sh | 7 - t/t7005-editor.sh | 6 +- t/t7102-reset.sh | 4 +- t/t7201-co.sh | 4 +- t/t7301-clean-interactive.sh | 11 + t/t7400-submodule-basic.sh | 12 +- t/t7405-submodule-merge.sh | 2 +- t/t7406-submodule-update.sh | 8 + t/t7411-submodule-config.sh | 87 +- t/t7415-submodule-names.sh | 132 - t/t7416-submodule-dash-url.sh | 48 - t/t7417-submodule-path-url.sh | 37 - t/t7504-commit-msg-hook.sh | 64 +- t/t7506-status-submodule.sh | 4 +- t/t7508-status.sh | 10 + t/t7513-interpret-trailers.sh | 142 + t/t7600-merge.sh | 6 +- t/t7610-mergetool.sh | 4 +- t/t7614-merge-signoff.sh | 69 + t/t9001-send-email.sh | 6 +- t/t9010-svn-fe.sh | 55 +- t/t9300-fast-import.sh | 58 +- t/t9350-fast-export.sh | 3 +- t/test-lib.sh | 31 +- tag.c | 10 +- tag.h | 2 +- tempfile.c | 232 +- tempfile.h | 123 +- templates/hooks--pre-rebase.sample | 2 +- templates/hooks--prepare-commit-msg.sample | 32 +- trailer.c | 234 +- trailer.h | 70 +- transport-helper.c | 4 +- transport.c | 6 +- tree-diff.c | 4 +- tree-walk.c | 15 +- tree-walk.h | 2 +- unpack-trees.c | 97 +- upload-pack.c | 5 +- usage.c | 15 + userdiff.c | 1 + utf8.c | 63 +- utf8.h | 5 - vcs-svn/svndump.c | 1 + worktree.c | 25 +- worktree.h | 8 + wt-status.c | 8 +- xdiff/xpatience.c | 2 +- 369 files changed, 57025 insertions(+), 33444 deletions(-) create mode 100644 .clang-format delete mode 100644 Documentation/RelNotes/2.13.7.txt delete mode 100644 Documentation/RelNotes/2.14.4.txt delete mode 100644 Documentation/RelNotes/2.14.5.txt delete mode 100644 Documentation/RelNotes/2.14.6.txt create mode 100644 Documentation/RelNotes/2.15.0.txt delete mode 100644 Documentation/technical/api-string-list.txt create mode 100644 Documentation/technical/hash-function-transition.txt create mode 100644 compat/win32/lazyload.h create mode 100644 oidmap.c create mode 100644 oidmap.h create mode 100644 packfile.c create mode 100644 packfile.h create mode 100644 po/es.po create mode 100644 refs/packed-backend.c create mode 100644 refs/packed-backend.h create mode 100644 t/helper/test-write-cache.c create mode 100755 t/perf/p0007-write-cache.sh delete mode 100755 t/t1200-tutorial.sh create mode 100755 t/t1408-packed-refs.sh create mode 100644 t/t4013/diff.diff-tree_--stat_initial_mode create mode 100644 t/t4013/diff.diff-tree_--summary_initial_mode create mode 100644 t/t4013/diff.diff-tree_initial_mode delete mode 100755 t/t7415-submodule-names.sh delete mode 100755 t/t7416-submodule-dash-url.sh delete mode 100755 t/t7417-submodule-path-url.sh create mode 100755 t/t7614-merge-signoff.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..611ab47 --- /dev/null +++ b/.clang-format @@ -0,0 +1,169 @@ +# This file is an example configuration for clang-format 5.0. +# +# Note that this style definition should only be understood as a hint +# for writing new code. The rules are still work-in-progress and does +# not yet exactly match the style we have in the existing code. + +# Use tabs whenever we need to fill whitespace that spans at least from one tab +# stop to the next one. +UseTab: Always +TabWidth: 8 +IndentWidth: 8 +ContinuationIndentWidth: 8 +ColumnLimit: 80 + +# C Language specifics +Language: Cpp + +# Align parameters on the open bracket +# someLongFunction(argument1, +# argument2); +AlignAfterOpenBracket: Align + +# Don't align consecutive assignments +# int aaaa = 12; +# int b = 14; +AlignConsecutiveAssignments: false + +# Don't align consecutive declarations +# int aaaa = 12; +# double b = 3.14; +AlignConsecutiveDeclarations: false + +# Align escaped newlines as far left as possible +# #define A \ +# int aaaa; \ +# int b; \ +# int cccccccc; +AlignEscapedNewlines: Left + +# Align operands of binary and ternary expressions +# int aaa = bbbbbbbbbbb + +# cccccc; +AlignOperands: true + +# Don't align trailing comments +# int a; // Comment a +# int b = 2; // Comment b +AlignTrailingComments: false + +# By default don't allow putting parameters onto the next line +# myFunction(foo, bar, baz); +AllowAllParametersOfDeclarationOnNextLine: false + +# Don't allow short braced statements to be on a single line +# if (a) not if (a) return; +# return; +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false + +# By default don't add a line break after the return type of top-level functions +# int foo(); +AlwaysBreakAfterReturnType: None + +# Pack as many parameters or arguments onto the same line as possible +# int myFunction(int aaaaaaaaaaaa, int bbbbbbbb, +# int cccc); +BinPackArguments: true +BinPackParameters: true + +# Attach braces to surrounding context except break before braces on function +# definitions. +# void foo() +# { +# if (true) { +# } else { +# } +# }; +BreakBeforeBraces: Linux + +# Break after operators +# int valuve = aaaaaaaaaaaaa + +# bbbbbb - +# ccccccccccc; +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: false + +# Don't break string literals +BreakStringLiterals: false + +# Use the same indentation level as for the switch statement. +# Switch statement body is always indented one level more than case labels. +IndentCaseLabels: false + +# Don't indent a function definition or declaration if it is wrapped after the +# type +IndentWrappedFunctionNames: false + +# Align pointer to the right +# int *a; +PointerAlignment: Right + +# Don't insert a space after a cast +# x = (int32)y; not x = (int32) y; +SpaceAfterCStyleCast: false + +# Insert spaces before and after assignment operators +# int a = 5; not int a=5; +# a += 42; a+=42; +SpaceBeforeAssignmentOperators: true + +# Put a space before opening parentheses only after control statement keywords. +# void f() { +# if (true) { +# f(); +# } +# } +SpaceBeforeParens: ControlStatements + +# Don't insert spaces inside empty '()' +SpaceInEmptyParentheses: false + +# The number of spaces before trailing line comments (// - comments). +# This does not affect trailing block comments (/* - comments). +SpacesBeforeTrailingComments: 1 + +# Don't insert spaces in casts +# x = (int32) y; not x = ( int32 ) y; +SpacesInCStyleCastParentheses: false + +# Don't insert spaces inside container literals +# var arr = [1, 2, 3]; not var arr = [ 1, 2, 3 ]; +SpacesInContainerLiterals: false + +# Don't insert spaces after '(' or before ')' +# f(arg); not f( arg ); +SpacesInParentheses: false + +# Don't insert spaces after '[' or before ']' +# int a[5]; not int a[ 5 ]; +SpacesInSquareBrackets: false + +# Insert a space after '{' and before '}' in struct initializers +Cpp11BracedListStyle: false + +# A list of macros that should be interpreted as foreach loops instead of as +# function calls. +ForEachMacros: ['for_each_string_list_item'] + +# The maximum number of consecutive empty lines to keep. +MaxEmptyLinesToKeep: 1 + +# No empty line at the start of a block. +KeepEmptyLinesAtTheStartOfBlocks: false + +# Penalties +# This decides what order things should be done if a line is too long +PenaltyBreakAssignment: 10 +PenaltyBreakBeforeFirstCallParameter: 30 +PenaltyBreakComment: 10 +PenaltyBreakFirstLessLess: 0 +PenaltyBreakString: 10 +PenaltyExcessCharacter: 100 +PenaltyReturnTypeOnItsOwnLine: 5 + +# Don't sort #include's +SortIncludes: false diff --git a/Documentation/Makefile b/Documentation/Makefile index 2415e0d..471bb29 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -67,6 +67,7 @@ SP_ARTICLES += howto/maintain-git API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt))) SP_ARTICLES += $(API_DOCS) +TECH_DOCS += technical/hash-function-transition TECH_DOCS += technical/http-protocol TECH_DOCS += technical/index-format TECH_DOCS += technical/pack-format diff --git a/Documentation/RelNotes/2.13.7.txt b/Documentation/RelNotes/2.13.7.txt deleted file mode 100644 index 09fc014..0000000 --- a/Documentation/RelNotes/2.13.7.txt +++ /dev/null @@ -1,20 +0,0 @@ -Git v2.13.7 Release Notes -========================= - -Fixes since v2.13.6 -------------------- - - * Submodule "names" come from the untrusted .gitmodules file, but we - blindly append them to $GIT_DIR/modules to create our on-disk repo - paths. This means you can do bad things by putting "../" into the - name. We now enforce some rules for submodule names which will cause - Git to ignore these malicious names (CVE-2018-11235). - - Credit for finding this vulnerability and the proof of concept from - which the test script was adapted goes to Etienne Stalmans. - - * It was possible to trick the code that sanity-checks paths on NTFS - into reading random piece of memory (CVE-2018-11233). - -Credit for fixing for these bugs goes to Jeff King, Johannes -Schindelin and others. diff --git a/Documentation/RelNotes/2.14.4.txt b/Documentation/RelNotes/2.14.4.txt deleted file mode 100644 index 97755a8..0000000 --- a/Documentation/RelNotes/2.14.4.txt +++ /dev/null @@ -1,5 +0,0 @@ -Git v2.14.4 Release Notes -========================= - -This release is to forward-port the fixes made in the v2.13.7 version -of Git. See its release notes for details. diff --git a/Documentation/RelNotes/2.14.5.txt b/Documentation/RelNotes/2.14.5.txt deleted file mode 100644 index 130645f..0000000 --- a/Documentation/RelNotes/2.14.5.txt +++ /dev/null @@ -1,16 +0,0 @@ -Git v2.14.5 Release Notes -========================= - -This release is to address the recently reported CVE-2018-17456. - -Fixes since v2.14.4 -------------------- - - * Submodules' "URL"s come from the untrusted .gitmodules file, but - we blindly gave it to "git clone" to clone submodules when "git - clone --recurse-submodules" was used to clone a project that has - such a submodule. The code has been hardened to reject such - malformed URLs (e.g. one that begins with a dash). - -Credit for finding and fixing this vulnerability goes to joernchen -and Jeff King, respectively. diff --git a/Documentation/RelNotes/2.14.6.txt b/Documentation/RelNotes/2.14.6.txt deleted file mode 100644 index 72b7af6..0000000 --- a/Documentation/RelNotes/2.14.6.txt +++ /dev/null @@ -1,54 +0,0 @@ -Git v2.14.6 Release Notes -========================= - -This release addresses the security issues CVE-2019-1348, -CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, -CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387. - -Fixes since v2.14.5 -------------------- - - * CVE-2019-1348: - The --export-marks option of git fast-import is exposed also via - the in-stream command feature export-marks=... and it allows - overwriting arbitrary paths. - - * CVE-2019-1349: - When submodules are cloned recursively, under certain circumstances - Git could be fooled into using the same Git directory twice. We now - require the directory to be empty. - - * CVE-2019-1350: - Incorrect quoting of command-line arguments allowed remote code - execution during a recursive clone in conjunction with SSH URLs. - - * CVE-2019-1351: - While the only permitted drive letters for physical drives on - Windows are letters of the US-English alphabet, this restriction - does not apply to virtual drives assigned via subst : - . Git mistook such paths for relative paths, allowing writing - outside of the worktree while cloning. - - * CVE-2019-1352: - Git was unaware of NTFS Alternate Data Streams, allowing files - inside the .git/ directory to be overwritten during a clone. - - * CVE-2019-1353: - When running Git in the Windows Subsystem for Linux (also known as - "WSL") while accessing a working directory on a regular Windows - drive, none of the NTFS protections were active. - - * CVE-2019-1354: - Filenames on Linux/Unix can contain backslashes. On Windows, - backslashes are directory separators. Git did not use to refuse to - write out tracked files with such filenames. - - * CVE-2019-1387: - Recursive clones are currently affected by a vulnerability that is - caused by too-lax validation of submodule names, allowing very - targeted attacks via remote code execution in recursive clones. - -Credit for finding these vulnerabilities goes to Microsoft Security -Response Center, in particular to Nicolas Joly. The `fast-import` -fixes were provided by Jeff King, the other fixes by Johannes -Schindelin with help from Garima Singh. diff --git a/Documentation/RelNotes/2.15.0.txt b/Documentation/RelNotes/2.15.0.txt new file mode 100644 index 0000000..248ba70 --- /dev/null +++ b/Documentation/RelNotes/2.15.0.txt @@ -0,0 +1,508 @@ +Git 2.15 Release Notes +====================== + +Backward compatibility notes and other notable changes. + + * Use of an empty string as a pathspec element that is used for + 'everything matches' is still warned and Git asks users to use a + more explicit '.' for that instead. The hope is that existing + users will not mind this change, and eventually the warning can be + turned into a hard error, upgrading the deprecation into removal of + this (mis)feature. That is now scheduled to happen in Git v2.16, + the next major release after this one. + + * Git now avoids blindly falling back to ".git" when the setup + sequence said we are _not_ in Git repository. A corner case that + happens to work right now may be broken by a call to BUG(). + We've tried hard to locate such cases and fixed them, but there + might still be cases that need to be addressed--bug reports are + greatly appreciated. + + * "branch --set-upstream" that has been deprecated in Git 1.8 has + finally been retired. + + +Updates since v2.14 +------------------- + +UI, Workflows & Features + + * An example that is now obsolete has been removed from a sample hook, + and an old example in it that added a sign-off manually has been + improved to use the interpret-trailers command. + + * The advice message given when "git rebase" stops for conflicting + changes has been improved. + + * The "rerere-train" script (in contrib/) learned the "--overwrite" + option to allow overwriting existing recorded resolutions. + + * "git contacts" (in contrib/) now lists the address on the + "Reported-by:" trailer to its output, in addition to those on + S-o-b: and other trailers, to make it easier to notify (and thank) + the original bug reporter. + + * "git rebase", especially when it is run by mistake and ends up + trying to replay many changes, spent long time in silence. The + command has been taught to show progress report when it spends + long time preparing these many changes to replay (which would give + the user a chance to abort with ^C). + + * "git merge" learned a "--signoff" option to add the Signed-off-by: + trailer with the committer's name. + + * "git diff" learned to optionally paint new lines that are the same + as deleted lines elsewhere differently from genuinely new lines. + + * "git interpret-trailers" learned to take the trailer specifications + from the command line that overrides the configured values. + + * "git interpret-trailers" has been taught a "--parse" and a few + other options to make it easier for scripts to grab existing + trailer lines from a commit log message. + + * The "--format=%(trailers)" option "git log" and its friends take + learned to take the 'unfold' and 'only' modifiers to normalize its + output, e.g. "git log --format=%(trailers:only,unfold)". + + * "gitweb" shows a link to visit the 'raw' contents of blbos in the + history overview page. + + * "[gc] rerereResolved = 5.days" used to be invalid, as the variable + is defined to take an integer counting the number of days. It now + is allowed. + + * The code to acquire a lock on a reference (e.g. while accepting a + push from a client) used to immediately fail when the reference is + already locked---now it waits for a very short while and retries, + which can make it succeed if the lock holder was holding it during + a read-only operation. + + * "branch --set-upstream" that has been deprecated in Git 1.8 has + finally been retired. + + * The codepath to call external process filter for smudge/clean + operation learned to show the progress meter. + + * "git rev-parse" learned "--is-shallow-repository", that is to be + used in a way similar to existing "--is-bare-repository" and + friends. + + * "git describe --match " has been taught to play well with + the "--all" option. + + * "git branch" learned "-c/-C" to create a new branch by copying an + existing one. + + * Some commands (most notably "git status") makes an opportunistic + update when performing a read-only operation to help optimize later + operations in the same repository. The new "--no-optional-locks" + option can be passed to Git to disable them. + + * "git for-each-ref --format=..." learned a new format element, + %(trailers), to show only the commit log trailer part of the log + message. + + +Performance, Internal Implementation, Development Support etc. + + * Conversion from uchar[20] to struct object_id continues. + + * Start using selected c99 constructs in small, stable and + essentialpart of the system to catch people who care about + older compilers that do not grok them. + + * The filter-process interface learned to allow a process with long + latency give a "delayed" response. + + * Many uses of comparision callback function the hashmap API uses + cast the callback function type when registering it to + hashmap_init(), which defeats the compile time type checking when + the callback interface changes (e.g. gaining more parameters). + The callback implementations have been updated to take "void *" + pointers and cast them to the type they expect instead. + + * Because recent Git for Windows do come with a real msgfmt, the + build procedure for git-gui has been updated to use it instead of a + hand-rolled substitute. + + * "git grep --recurse-submodules" has been reworked to give a more + consistent output across submodule boundary (and do its thing + without having to fork a separate process). + + * A helper function to read a single whole line into strbuf + mistakenly triggered OOM error at EOF under certain conditions, + which has been fixed. + + * The "ref-store" code reorganization continues. + + * "git commit" used to discard the index and re-read from the filesystem + just in case the pre-commit hook has updated it in the middle; this + has been optimized out when we know we do not run the pre-commit hook. + (merge 680ee550d7 kw/commit-keep-index-when-pre-commit-is-not-run later to maint). + + * Updates to the HTTP layer we made recently unconditionally used + features of libCurl without checking the existence of them, causing + compilation errors, which has been fixed. Also migrate the code to + check feature macros, not version numbers, to cope better with + libCurl that vendor ships with backported features. + + * The API to start showing progress meter after a short delay has + been simplified. + (merge 8aade107dd jc/simplify-progress later to maint). + + * Code clean-up to avoid mixing values read from the .gitmodules file + and values read from the .git/config file. + + * We used to spend more than necessary cycles allocating and freeing + piece of memory while writing each index entry out. This has been + optimized. + + * Platforms that ship with a separate sha1 with collision detection + library can link to it instead of using the copy we ship as part of + our source tree. + + * Code around "notes" have been cleaned up. + (merge 3964281524 mh/notes-cleanup later to maint). + + * The long-standing rule that an in-core lockfile instance, once it + is used, must not be freed, has been lifted and the lockfile and + tempfile APIs have been updated to reduce the chance of programming + errors. + + * Our hashmap implementation in hashmap.[ch] is not thread-safe when + adding a new item needs to expand the hashtable by rehashing; add + an API to disable the automatic rehashing to work it around. + + * Many of our programs consider that it is OK to release dynamic + storage that is used throughout the life of the program by simply + exiting, but this makes it harder to leak detection tools to avoid + reporting false positives. Plug many existing leaks and introduce + a mechanism for developers to mark that the region of memory + pointed by a pointer is not lost/leaking to help these tools. + + * As "git commit" to conclude a conflicted "git merge" honors the + commit-msg hook, "git merge" that records a merge commit that + cleanly auto-merges should, but it didn't. + + * The codepath for "git merge-recursive" has been cleaned up. + + * Many leaks of strbuf have been fixed. + + * "git imap-send" has our own implementation of the protocol and also + can use more recent libCurl with the imap protocol support. Update + the latter so that it can use the credential subsystem, and then + make it the default option to use, so that we can eventually + deprecate and remove the former. + + * "make style" runs git-clang-format to help developers by pointing + out coding style issues. + + * A test to demonstrate "git mv" failing to adjust nested submodules + has been added. + (merge c514167df2 hv/mv-nested-submodules-test later to maint). + + * On Cygwin, "ulimit -s" does not report failure but it does not work + at all, which causes an unexpected success of some tests that + expect failures under a limited stack situation. This has been + fixed. + + * Many codepaths have been updated to squelch -Wimplicit-fallthrough + warnings from Gcc 7 (which is a good code hygiene). + + * Add a helper for DLL loading in anticipation for its need in a + future topic RSN. + + * "git status --ignored", when noticing that a directory without any + tracked path is ignored, still enumerated all the ignored paths in + the directory, which is unnecessary. The codepath has been + optimized to avoid this overhead. + + * The final batch to "git rebase -i" updates to move more code from + the shell script to C has been merged. + + * Operations that do not touch (majority of) packed refs have been + optimized by making accesses to packed-refs file lazy; we no longer + pre-parse everything, and an access to a single ref in the + packed-refs does not touch majority of irrelevant refs, either. + + * Add comment to clarify that the style file is meant to be used with + clang-5 and the rules are still work in progress. + + * Many variables that points at a region of memory that will live + throughout the life of the program have been marked with UNLEAK + marker to help the leak checkers concentrate on real leaks.. + + * Plans for weaning us off of SHA-1 has been documented. + + * A new "oidmap" API has been introduced and oidset API has been + rewritten to use it. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v2.14 +----------------- + + * "%C(color name)" in the pretty print format always produced ANSI + color escape codes, which was an early design mistake. They now + honor the configuration (e.g. "color.ui = never") and also tty-ness + of the output medium. + + * The http.{sslkey,sslCert} configuration variables are to be + interpreted as a pathname that honors "~[username]/" prefix, but + weren't, which has been fixed. + + * Numerous bugs in walking of reflogs via "log -g" and friends have + been fixed. + + * "git commit" when seeing an totally empty message said "you did not + edit the message", which is clearly wrong. The message has been + corrected. + + * When a directory is not readable, "gitweb" fails to build the + project list. Work this around by skipping such a directory. + + * Some versions of GnuPG fails to kill gpg-agent it auto-spawned + and such a left-over agent can interfere with a test. Work it + around by attempting to kill one before starting a new test. + + * A recently added test for the "credential-cache" helper revealed + that EOF detection done around the time the connection to the cache + daemon is torn down were flaky. This was fixed by reacting to + ECONNRESET and behaving as if we got an EOF. + + * "git log --tag=no-such-tag" showed log starting from HEAD, which + has been fixed---it now shows nothing. + + * The "tag.pager" configuration variable was useless for those who + actually create tag objects, as it interfered with the use of an + editor. A new mechanism has been introduced for commands to enable + pager depending on what operation is being carried out to fix this, + and then "git tag -l" is made to run pager by default. + + * "git push --recurse-submodules $there HEAD:$target" was not + propagated down to the submodules, but now it is. + + * Commands like "git rebase" accepted the --rerere-autoupdate option + from the command line, but did not always use it. This has been + fixed. + + * "git clone --recurse-submodules --quiet" did not pass the quiet + option down to submodules. + + * Test portability fix for OBSD. + + * Portability fix for OBSD. + + * "git am -s" has been taught that some input may end with a trailer + block that is not Signed-off-by: and it should refrain from adding + an extra blank line before adding a new sign-off in such a case. + + * "git svn" used with "--localtime" option did not compute the tz + offset for the timestamp in question and instead always used the + current time, which has been corrected. + + * Memory leak in an error codepath has been plugged. + + * "git stash -u" used the contents of the committed version of the + ".gitignore" file to decide which paths are ignored, even when the + file has local changes. The command has been taught to instead use + the locally modified contents. + + * bash 4.4 or newer gave a warning on NUL byte in command + substitution done in "git stash"; this has been squelched. + + * "git grep -L" and "git grep --quiet -L" reported different exit + codes; this has been corrected. + + * When handshake with a subprocess filter notices that the process + asked for an unknown capability, Git did not report what program + the offending subprocess was running. This has been corrected. + + * "git apply" that is used as a better "patch -p1" failed to apply a + taken from a file with CRLF line endings to a file with CRLF line + endings. The root cause was because it misused convert_to_git() + that tried to do "safe-crlf" processing by looking at the index + entry at the same path, which is a nonsense---in that mode, "apply" + is not working on the data in (or derived from) the index at all. + This has been fixed. + + * Killing "git merge --edit" before the editor returns control left + the repository in a state with MERGE_MSG but without MERGE_HEAD, + which incorrectly tells the subsequent "git commit" that there was + a squash merge in progress. This has been fixed. + + * "git archive" did not work well with pathspecs and the + export-ignore attribute. + + * In addition to "cc: # cruft", "cc: a@dd.re.ss # cruft" + was taught to "git send-email" as a valid way to tell it that it + needs to also send a carbon copy to in the trailer + section. + + * "git branch -M a b" while on a branch that is completely unrelated + to either branch a or branch b misbehaved when multiple worktree + was in use. This has been fixed. + (merge 31824d180d nd/worktree-kill-parse-ref later to maint). + + * "git gc" and friends when multiple worktrees are used off of a + single repository did not consider the index and per-worktree refs + of other worktrees as the root for reachability traversal, making + objects that are in use only in other worktrees to be subject to + garbage collection. + + * A regression to "gitk --bisect" by a recent update has been fixed. + + * "git -c submodule.recurse=yes pull" did not work as if the + "--recurse-submodules" option was given from the command line. + This has been corrected. + + * Unlike "git commit-tree < file", "git commit-tree -F file" did not + pass the contents of the file verbatim and instead completed an + incomplete line at the end, if exists. The latter has been updated + to match the behaviour of the former. + + * Many codepaths did not diagnose write failures correctly when disks + go full, due to their misuse of write_in_full() helper function, + which have been corrected. + (merge f48ecd38cb jk/write-in-full-fix later to maint). + + * "git help co" now says "co is aliased to ...", not "git co is". + (merge b3a8076e0d ks/help-alias-label later to maint). + + * "git archive", especially when used with pathspec, stored an empty + directory in its output, even though Git itself never does so. + This has been fixed. + + * API error-proofing which happens to also squelch warnings from GCC. + + * The explanation of the cut-line in the commit log editor has been + slightly tweaked. + (merge 8c4b1a3593 ks/commit-do-not-touch-cut-line later to maint). + + * "git gc" tries to avoid running two instances at the same time by + reading and writing pid/host from and to a lock file; it used to + use an incorrect fscanf() format when reading, which has been + corrected. + + * The scripts to drive TravisCI has been reorganized and then an + optimization to avoid spending cycles on a branch whose tip is + tagged has been implemented. + (merge 8376eb4a8f ls/travis-scriptify later to maint). + + * The test linter has been taught that we do not like "echo -e". + + * Code cmp.std.c nitpick. + + * A regression fix for 2.11 that made the code to read the list of + alternate object stores overrun the end of the string. + (merge f0f7bebef7 jk/info-alternates-fix later to maint). + + * "git describe --match" learned to take multiple patterns in v2.13 + series, but the feature ignored the patterns after the first one + and did not work at all. This has been fixed. + + * "git filter-branch" cannot reproduce a history with a tag without + the tagger field, which only ancient versions of Git allowed to be + created. This has been corrected. + (merge b2c1ca6b4b ic/fix-filter-branch-to-handle-tag-without-tagger later to maint). + + * "git cat-file --textconv" started segfaulting recently, which + has been corrected. + + * The built-in pattern to detect the "function header" for HTML did + not match

..

elements without any attributes, which has + been fixed. + + * "git mailinfo" was loose in decoding quoted printable and produced + garbage when the two letters after the equal sign are not + hexadecimal. This has been fixed. + + * The machinery to create xdelta used in pack files received the + sizes of the data in size_t, but lost the higher bits of them by + storing them in "unsigned int" during the computation, which is + fixed. + + * The delta format used in the packfile cannot reference data at + offset larger than what can be expressed in 4-byte, but the + generator for the data failed to make sure the offset does not + overflow. This has been corrected. + + * The documentation for '-X