summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-04-22Merge branch 'js/mingw-fixes'Libravatar Junio C Hamano2-4/+43
Misc fixes for Windows. * js/mingw-fixes: mingw: help debugging by optionally executing bash with strace mingw: do not treat `COM0` as a reserved file name mingw: use modern strftime implementation if possible
2020-04-22Merge branch 'jc/missing-ref-store-fix'Libravatar Junio C Hamano4-8/+16
We've left the command line parsing of "git log :/a/b/" broken for about a full year without anybody noticing, which has been corrected. * jc/missing-ref-store-fix: repository: mark the "refs" pointer as private sha1-name: do not assume that the ref store is initialized
2020-04-22Merge branch 'ma/config-doc-fix'Libravatar Junio C Hamano1-5/+5
Doc update. * ma/config-doc-fix: config.txt: move closing "----" to cover entire listing
2020-04-22Merge branch 'eb/format-patch-no-encode-headers'Libravatar Junio C Hamano9-3/+85
The output from "git format-patch" uses RFC 2047 encoding for non-ASCII letters on From: and Subject: headers, so that it can directly be fed to e-mail programs. A new option has been added to produce these headers in raw. * eb/format-patch-no-encode-headers: format-patch: teach --no-encode-email-headers
2020-04-22Merge branch 'pb/pull-fetch-doc'Libravatar Junio C Hamano2-4/+5
The more aggressive updates to remote-tracking branches we had for the past 7 years or so were not reflected in the documentation, which has been corrected. * pb/pull-fetch-doc: pull doc: correct outdated description of an example pull doc: refer to a specific section in 'fetch' doc
2020-04-22Merge branch 'dd/no-gpg-sign'Libravatar Junio C Hamano11-18/+190
"git rebase" learned the "--no-gpg-sign" option to countermand commit.gpgSign the user may have. * dd/no-gpg-sign: Documentation: document merge option --no-gpg-sign Documentation: merge commit-tree --[no-]gpg-sign Documentation: reword commit --no-gpg-sign Documentation: document am --no-gpg-sign cherry-pick/revert: honour --no-gpg-sign in all case rebase.c: honour --no-gpg-sign
2020-04-22Merge branch 'js/t0007-typofix'Libravatar Junio C Hamano1-1/+1
Typofix in a test script. * js/t0007-typofix: t0007: fix a typo
2020-04-22Merge branch 'en/sequencer-reflog-action'Libravatar Junio C Hamano2-10/+16
"git rebase -i" did not leave the reflog entries correctly. * en/sequencer-reflog-action: sequencer: honor GIT_REFLOG_ACTION
2020-04-22Merge branch 'jk/use-quick-lookup-in-clone-for-tag-following'Libravatar Junio C Hamano2-1/+11
The logic to auto-follow tags by "git clone --single-branch" was not careful to avoid lazy-fetching unnecessary tags, which has been corrected. * jk/use-quick-lookup-in-clone-for-tag-following: clone: use "quick" lookup while following tags
2020-04-22Merge branch 'ag/rebase-merge-allow-ff-under-abbrev-command'Libravatar Junio C Hamano2-8/+25
"git rebase" with the merge backend did not work well when the rebase.abbreviateCommands configuration was set. * ag/rebase-merge-allow-ff-under-abbrev-command: t3432: test `--merge' with `rebase.abbreviateCommands = true', too sequencer: don't abbreviate a command if it doesn't have a short form
2020-04-22Merge branch 'jk/oid-array-cleanups'Libravatar Junio C Hamano32-55/+54
Code cleanup. * jk/oid-array-cleanups: oidset: stop referring to sha1-array ref-filter: stop referring to "sha1 array" bisect: stop referring to sha1_array test-tool: rename sha1-array to oid-array oid_array: rename source file from sha1-array oid_array: use size_t for iteration oid_array: use size_t for count and allocation
2020-04-22Merge branch 'jm/gitweb-fastcgi-utf8'Libravatar Junio C Hamano1-0/+16
Gitweb update. * jm/gitweb-fastcgi-utf8: gitweb: fix UTF-8 encoding when using CGI::Fast
2020-04-22Merge branch 'jc/allow-strlen-substitution-in-shell-scripts'Libravatar Junio C Hamano1-2/+0
Coding guideline update. * jc/allow-strlen-substitution-in-shell-scripts: CodingGuidelines: allow ${#posix} == strlen($posix)
2020-04-22Merge branch 'en/pull-do-not-rebase-after-fast-forwarding'Libravatar Junio C Hamano1-1/+4
"git pull --rebase" tried to run a rebase even after noticing that the pull results in a fast-forward and no rebase is needed nor sensible, for the past few years due to a mistake nobody noticed. * en/pull-do-not-rebase-after-fast-forwarding: pull: avoid running both merge and rebase
2020-04-22Merge branch 'dl/wrapper-fix-indentation'Libravatar Junio C Hamano1-2/+2
Coding style fix. * dl/wrapper-fix-indentation: wrapper: indent with tabs
2020-04-22Merge branch 'ag/sequencer-i18n-messages'Libravatar Junio C Hamano1-3/+3
Message fix. * ag/sequencer-i18n-messages: sequencer: mark messages for translation
2020-04-22Merge branch 'rs/pull-options-sync-code-and-doc'Libravatar Junio C Hamano2-1/+19
"git pull" shares many options with underlying "git fetch", but some of them were not documented and some of those that would make sense to pass down were not passed down. * rs/pull-options-sync-code-and-doc: pull: pass documented fetch options on pull: remove --update-head-ok from documentation
2020-04-22Merge branch 'js/walk-doc-optim'Libravatar Junio C Hamano1-3/+0
Code cleanup. * js/walk-doc-optim: MyFirstObjectWalk: remove unnecessary conditional statement
2020-04-22Merge branch 'pb/rebase-doc-typofix'Libravatar Junio C Hamano1-1/+1
Typofix. * pb/rebase-doc-typofix: git-rebase.txt: fix typo
2020-04-22Merge branch 'jk/p5310-drop-non-bitmap-timing'Libravatar Junio C Hamano1-4/+0
Perf-test update. * jk/p5310-drop-non-bitmap-timing: p5310: stop timing non-bitmap pack-to-disk
2020-04-22Merge branch 'jk/harden-protocol-v2-delim-handling'Libravatar Junio C Hamano5-16/+68
The server-end of the v2 protocol to serve "git clone" and "git fetch" was not prepared to see a delim packets at unexpected places, which led to a crash. * jk/harden-protocol-v2-delim-handling: test-lib-functions: simplify packetize() stdin code upload-pack: handle unexpected delim packets test-lib-functions: make packetize() more efficient
2020-04-22Merge branch 'jk/test-cleanup'Libravatar Junio C Hamano4-1/+2
Test cleanup. * jk/test-cleanup: t/lib-*.sh: drop executable bit t/lib-credential.sh: drop shebang line
2020-04-22Merge branch 'ak/run-command-on-cygwin-fix'Libravatar Junio C Hamano3-5/+24
Utitiles run via the run_command() API were not spawned correctly on Cygwin, when the paths to them are given as a full path with backslashes. * ak/run-command-on-cygwin-fix: run-command: trigger PATH lookup properly on Cygwin
2020-04-22Merge branch 'dr/midx-avoid-int-underflow'Libravatar Junio C Hamano3-4/+24
When fed a midx that records no objects, some codepaths tried to loop from 0 through (num_objects-1), which, due to integer arithmetic wrapping around, made it nonsense operation with out of bounds array accesses. The code has been corrected to reject such an midx file. * dr/midx-avoid-int-underflow: midx.c: fix an integer underflow
2020-04-22Merge branch 'dl/test-must-fail-fixes-3'Libravatar Junio C Hamano5-56/+66
Test clean-up continues. * dl/test-must-fail-fixes-3: t5801: teach compare_refs() to accept ! t5612: stop losing return codes of git commands t5612: don't use `test_must_fail test_cmp` t5607: reorder `nongit test_must_fail` t5550: simplify no matching line check t5512: stop losing return codes of git commands t5512: stop losing git exit code in here-docs t5512: don't use `test_must_fail test_cmp`
2020-04-22Merge branch 'js/trace2-env-vars'Libravatar Junio C Hamano11-1/+143
Trace2 enhancement to allow logging of the environment variables. * js/trace2-env-vars: trace2: teach Git to log environment variables
2020-04-22Merge branch 'jt/connectivity-check-optim-in-partial-clone'Libravatar Junio C Hamano4-23/+9
Simplify the commit ancestry connectedness check in a partial clone repository in which "promised" objects are assumed to be obtainable lazily on-demand from promisor remote repositories. * jt/connectivity-check-optim-in-partial-clone: connected: always use partial clone optimization
2020-04-22Merge branch 'bc/faq'Libravatar Junio C Hamano2-0/+338
Doc update. * bc/faq: docs: add a FAQ
2020-04-22Merge branch 'bk/p4-pre-edit-changelist'Libravatar Junio C Hamano3-58/+274
"git p4" learned four new hooks and also "--no-verify" option to bypass them (and the existing "p4-pre-submit" hook). * bk/p4-pre-edit-changelist: git-p4: add RCS keyword status message git-p4: add p4 submit hooks git-p4: restructure code in submit git-p4: add --no-verify option git-p4: add p4-pre-submit exit text git-p4: create new function run_git_hook git-p4: rewrite prompt to be Windows compatible
2020-04-22Merge branch 'mt/test-lib-bundled-short-options'Libravatar Junio C Hamano2-15/+49
Minor test usability improvement. * mt/test-lib-bundled-short-options: test-lib: allow short options to be bundled
2020-04-22Merge branch 'js/import-tars-do-not-make-phony-files-from-pax-headers'Libravatar Junio C Hamano1-0/+2
The import-tars importer (in contrib/fast-import/) used to create phony files at the top-level of the repository when the archive contains global PAX headers, which made its own logic to detect and omit the common leading directory ineffective, which has been corrected. * js/import-tars-do-not-make-phony-files-from-pax-headers: import-tars: ignore the global PAX header
2020-04-22Merge branch 'js/test-junit-finalization-fix'Libravatar Junio C Hamano1-0/+1
Test fix. * js/test-junit-finalization-fix: tests(junit-xml): avoid invalid XML
2020-04-22Merge branch 'js/tests-gpg-integration-on-windows'Libravatar Junio C Hamano3-52/+77
Enable tests that require GnuPG on Windows. * js/tests-gpg-integration-on-windows: tests: increase the verbosity of the GPG-related prereqs tests: turn GPG, GPGSM and RFC1991 into lazy prereqs tests: do not let lazy prereqs inside `test_expect_*` turn off tracing t/lib-gpg.sh: stop pretending to be a stand-alone script tests(gpg): allow the gpg-agent to start on Windows
2020-04-22Merge branch 'jk/t3419-drop-expensive-tests'Libravatar Junio C Hamano1-72/+42
Test update. * jk/t3419-drop-expensive-tests: t3419: drop EXPENSIVE tests
2020-04-22Merge branch 'ds/doc-clone-filter'Libravatar Junio C Hamano1-1/+12
Doc update. * ds/doc-clone-filter: clone: document --filter options
2020-04-22Merge branch 'ar/test-style-fixes'Libravatar Junio C Hamano13-49/+49
Style fixes. * ar/test-style-fixes: t: fix whitespace around && t9500: remove spaces after redirect operators
2020-04-19Sync with 2.26.2Libravatar Junio C Hamano16-40/+503
2020-04-19Git 2.26.2Libravatar Jonathan Nieder18-42/+504
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.25.4Libravatar Jonathan Nieder17-42/+499
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.24.3Libravatar Jonathan Nieder16-42/+494
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.23.3Libravatar Jonathan Nieder15-42/+489
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.22.4Libravatar Jonathan Nieder14-42/+484
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.21.3Libravatar Jonathan Nieder13-42/+479
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.20.4Libravatar Jonathan Nieder12-42/+474
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.19.5Libravatar Jonathan Nieder11-42/+469
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.18.4Libravatar Jonathan Nieder10-42/+464
This merges up the security fix from v2.17.5. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19Git 2.17.5Libravatar Jeff King3-2/+24
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19fsck: reject URL with empty host in .gitmodulesLibravatar Jonathan Nieder2-3/+39
Git's URL parser interprets https:///example.com/repo.git to have no host and a path of "example.com/repo.git". Curl, on the other hand, internally redirects it to https://example.com/repo.git. As a result, until "credential: parse URL without host as empty host, not unset", tricking a user into fetching from such a URL would cause Git to send credentials for another host to example.com. Teach fsck to block and detect .gitmodules files using such a URL to prevent sharing them with Git versions that are not yet protected. A relative URL in a .gitmodules file could also be used to trigger this. The relative URL resolver used for .gitmodules does not normalize sequences of slashes and can follow ".." components out of the path part and to the host part of a URL, meaning that such a relative URL can be used to traverse from a https://foo.example.com/innocent superproject to a https:///attacker.example.com/exploit submodule. Fortunately, redundant extra slashes in .gitmodules are rare, so we can catch this by detecting one after a leading sequence of "./" and "../" components. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Jeff King <peff@peff.net>
2020-04-19credential: treat URL with empty scheme as invalidLibravatar Jonathan Nieder3-3/+43
Until "credential: refuse to operate when missing host or protocol", Git's credential handling code interpreted URLs with empty scheme to mean "give me credentials matching this host for any protocol". Luckily libcurl does not recognize such URLs (it tries to look for a protocol named "" and fails). Just in case that changes, let's reject them within Git as well. This way, credential_from_url is guaranteed to always produce a "struct credential" with protocol and host set. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2020-04-19credential: treat URL without scheme as invalidLibravatar Jonathan Nieder4-9/+84
libcurl permits making requests without a URL scheme specified. In this case, it guesses the URL from the hostname, so I can run git ls-remote http::ftp.example.com/path/to/repo and it would make an FTP request. Any user intentionally using such a URL is likely to have made a typo. Unfortunately, credential_from_url is not able to determine the host and protocol in order to determine appropriate credentials to send, and until "credential: refuse to operate when missing host or protocol", this resulted in another host's credentials being leaked to the named host. Teach credential_from_url_gently to consider such a URL to be invalid so that fsck can detect and block gitmodules files with such URLs, allowing server operators to avoid serving them to downstream users running older versions of Git. This also means that when such URLs are passed on the command line, Git will print a clearer error so affected users can switch to the simpler URL that explicitly specifies the host and protocol they intend. One subtlety: .gitmodules files can contain relative URLs, representing a URL relative to the URL they were cloned from. The relative URL resolver used for .gitmodules can follow ".." components out of the path part and past the host part of a URL, meaning that such a relative URL can be used to traverse from a https://foo.example.com/innocent superproject to a https::attacker.example.com/exploit submodule. Fortunately a leading ':' in the first path component after a series of leading './' and '../' components is unlikely to show up in other contexts, so we can catch this by detecting that pattern. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Jeff King <peff@peff.net>