summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-28Merge branch 'jt/perf-updates' into maintLibravatar Junio C Hamano3-3/+7
The t/perf performance test suite was not prepared to test not so old versions of Git, but now it covers versions of Git that are not so ancient. * jt/perf-updates: t/perf: add fallback for pre-bin-wrappers versions of git t/perf: use $MODERN_GIT for all repo-copying steps t/perf: export variable used in other blocks
2017-03-28Merge branch 'rs/strbuf-add-real-path' into maintLibravatar Junio C Hamano6-2/+49
An helper function to make it easier to append the result from real_path() to a strbuf has been added. * rs/strbuf-add-real-path: strbuf: add strbuf_add_real_path() cocci: use ALLOC_ARRAY
2017-03-28Merge branch 'jk/parse-config-key-cleanup' into maintLibravatar Junio C Hamano3-10/+16
The "parse_config_key()" API function has been cleaned up. * jk/parse-config-key-cleanup: parse_hide_refs_config: tell parse_config_key we don't want a subsection parse_config_key: allow matching single-level config parse_config_key: use skip_prefix instead of starts_with refs: parse_hide_refs_config to use parse_config_key
2017-03-24Git 2.12.2Libravatar Junio C Hamano3-2/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-24Merge branch 'ab/doc-no-option-notation-fix' into maintLibravatar Junio C Hamano2-2/+2
Doc fix. * ab/doc-no-option-notation-fix: doc: change erroneous --[no]-whatever into --[no-]whatever
2017-03-24Merge branch 'ab/push-default-doc-fix' into maintLibravatar Junio C Hamano1-0/+2
Doc fix. * ab/push-default-doc-fix: push: mention "push.default=tracking" in the documentation
2017-03-24Merge branch 'nd/commit-hook-doc-fix' into maintLibravatar Junio C Hamano1-1/+1
Doc fix. * nd/commit-hook-doc-fix: git-commit.txt: list post-rewrite in HOOKS section
2017-03-24Merge branch 'jc/config-case-cmdline-take-2' into maintLibravatar Junio C Hamano2-97/+163
The code to parse "git -c VAR=VAL cmd" and set configuration variable for the duration of cmd had two small bugs, which have been fixed. This supersedes jc/config-case-cmdline topic that has been discarded. * jc/config-case-cmdline-take-2: config: use git_config_parse_key() in git_config_parse_parameter() config: move a few helper functions up
2017-03-24Merge branch 'jk/grep-no-index-fix' into maintLibravatar Junio C Hamano2-27/+121
The code to parse the command line "git grep <patterns>... <rev> [[--] <pathspec>...]" has been cleaned up, and a handful of bugs have been fixed (e.g. we used to check "--" if it is a rev). * jk/grep-no-index-fix: grep: treat revs the same for --untracked as for --no-index grep: do not diagnose misspelt revs with --no-index grep: avoid resolving revision names in --no-index case grep: fix "--" rev/pathspec disambiguation grep: re-order rev-parsing loop grep: do not unnecessarily query repo for "--" grep: move thread initialization a little lower
2017-03-24Merge branch 'jn/remote-helpers-with-git-dir' into maintLibravatar Junio C Hamano4-3/+22
"git ls-remote" and "git archive --remote" are designed to work without being in a directory under Git's control. However, recent updates revealed that we randomly look into a directory called .git/ without actually doing necessary set-up when working in a repository. Stop doing so. * jn/remote-helpers-with-git-dir: remote helpers: avoid blind fall-back to ".git" when setting GIT_DIR remote: avoid reading $GIT_DIR config in non-repo
2017-03-24Merge branch 'sb/submodule-config-parse-ignore-fix' into maintLibravatar Junio C Hamano1-1/+1
Code to read submodule.<name>.ignore config did not state the variable name correctly when giving an error message diagnosing misconfiguration. * sb/submodule-config-parse-ignore-fix: submodule-config: correct error reporting for invalid ignore value
2017-03-24Merge branch 'jk/push-deadlock-regression-fix' into maintLibravatar Junio C Hamano2-11/+40
"git push" had a handful of codepaths that could lead to a deadlock when unexpected error happened, which has been fixed. * jk/push-deadlock-regression-fix: send-pack: report signal death of pack-objects send-pack: read "unpack" status even on pack-objects failure send-pack: improve unpack-status error messages send-pack: use skip_prefix for parsing unpack status send-pack: extract parsing of "unpack" response receive-pack: fix deadlock when we cannot create tmpdir
2017-03-24mailmap: use Michael J Gruber's new addressLibravatar Michael J Gruber1-1/+2
Map both old addresses to the new, hopefully more permanent one. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Michael J Gruber <git@grubix.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Prepare for 2.12.2Libravatar Junio C Hamano2-1/+62
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Merge branch 'jh/send-email-one-cc' into maintLibravatar Junio C Hamano2-5/+4
"Cc:" on the trailer part does not have to conform to RFC strictly, unlike in the e-mail header. "git send-email" has been updated to ignore anything after '>' when picking addresses, to allow non-address cruft like " # stable 4.4" after the address. * jh/send-email-one-cc: send-email: only allow one address per body tag
2017-03-21Merge branch 'jk/t6300-cleanup' into maintLibravatar Junio C Hamano1-1/+1
A test that creates a confusing branch whose name is HEAD has been corrected not to do so. * jk/t6300-cleanup: t6300: avoid creating refs/heads/HEAD
2017-03-21Merge branch 'rs/commit-parsing-optim' into maintLibravatar Junio C Hamano1-12/+10
The code that parses header fields in the commit object has been updated for (micro)performance and code hygiene. * rs/commit-parsing-optim: commit: don't check for space twice when looking for header commit: be more precise when searching for headers
2017-03-21Merge branch 'jk/show-branch-lift-name-len-limit' into maintLibravatar Junio C Hamano1-29/+13
"git show-branch" expected there were only very short branch names in the repository and used a fixed-length buffer to hold them without checking for overflow. * jk/show-branch-lift-name-len-limit: show-branch: use skip_prefix to drop magic numbers show-branch: store resolved head in heap buffer show-branch: drop head_len variable
2017-03-21Merge branch 'jk/tempfile-ferror-fclose-confusion' into maintLibravatar Junio C Hamano1-2/+7
A caller of tempfile API that uses stdio interface to write to files may ignore errors while writing, which is detected when tempfile is closed (with a call to ferror()). By that time, the original errno that may have told us what went wrong is likely to be long gone and was overwritten by an irrelevant value. close_tempfile() now resets errno to EIO to make errno at least predictable. * jk/tempfile-ferror-fclose-confusion: tempfile: set errno to a known value before calling ferror()
2017-03-21Merge branch 'rl/remote-allow-missing-branch-name-merge' into maintLibravatar Junio C Hamano2-1/+22
"git remote rm X", when a branch has remote X configured as the value of its branch.*.remote, tried to remove branch.*.remote and branch.*.merge and failed if either is unset. * rl/remote-allow-missing-branch-name-merge: remote: ignore failure to remove missing branch.<name>.merge
2017-03-21Merge branch 'dt/gc-ignore-old-gc-logs' into maintLibravatar Junio C Hamano3-7/+71
A "gc.log" file left by a backgrounded "gc --auto" disables further automatic gc; it has been taught to run at least once a day (by default) by ignoring a stale "gc.log" file that is too old. * dt/gc-ignore-old-gc-logs: gc: ignore old gc.log files
2017-03-21Merge branch 'jt/upload-pack-error-report' into maintLibravatar Junio C Hamano1-1/+5
"git upload-pack", which is a counter-part of "git fetch", did not report a request for a ref that was not advertised as invalid. This is generally not a problem (because "git fetch" will stop before making such a request), but is the right thing to do. * jt/upload-pack-error-report: upload-pack: report "not our ref" to client
2017-03-21Merge branch 'rs/sha1-file-plug-fallback-base-leak' into maintLibravatar Junio C Hamano1-0/+4
A leak in a codepath to read from a packed object in (rare) cases has been plugged. * rs/sha1-file-plug-fallback-base-leak: sha1_file: release fallback base's memory in unpack_entry()
2017-03-21Merge branch 'ss/remote-bzr-hg-placeholder-wo-python' into maintLibravatar Junio C Hamano2-18/+14
There is no need for Python only to give a few messages to the standard error stream, but we somehow did. * ss/remote-bzr-hg-placeholder-wo-python: contrib: git-remote-{bzr,hg} placeholders don't need Python
2017-03-21Merge branch 'jc/diff-populate-filespec-size-only-fix' into maintLibravatar Junio C Hamano2-1/+27
"git diff --quiet" relies on the size field in diff_filespec to be correctly populated, but diff_populate_filespec() helper function made an incorrect short-cut when asked only to populate the size field for paths that need to go through convert_to_git() (e.g. CRLF conversion). * jc/diff-populate-filespec-size-only-fix: diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()
2017-03-21Merge branch 'jk/http-walker-buffer-underflow-fix' into maintLibravatar Junio C Hamano1-4/+7
"Dumb http" transport used to misparse a nonsense http-alternates response, which has been fixed. * jk/http-walker-buffer-underflow-fix: http-walker: fix buffer underflow processing remote alternates
2017-03-21Merge branch 'mg/status-porcelain-no-i18n' into maintLibravatar Junio C Hamano1-4/+4
"git status --porcelain" is supposed to give a stable output, but a few strings were left as translatable by mistake. * mg/status-porcelain-no-i18n: git-status: make porcelain more robust
2017-03-21Merge branch 'ps/docs-diffcore' into maintLibravatar Junio C Hamano1-5/+5
Doc update. * ps/docs-diffcore: docs/diffcore: unquote "Complete Rewrites" in headers docs/diffcore: fix grammar in diffcore-rename header
2017-03-21Merge branch 'ew/markdown-url-in-readme' into maintLibravatar Junio C Hamano1-3/+3
Doc update. * ew/markdown-url-in-readme: README: create HTTP/HTTPS links from URLs in Markdown
2017-03-21Merge branch 'rj/remove-unused-mktemp' into maintLibravatar Junio C Hamano6-60/+0
Code cleanup. * rj/remove-unused-mktemp: wrapper.c: remove unused gitmkstemps() function wrapper.c: remove unused git_mkstemp() function
2017-03-21Merge branch 'jk/ewah-use-right-type-in-sizeof' into maintLibravatar Junio C Hamano1-2/+2
Code clean-up. * jk/ewah-use-right-type-in-sizeof: ewah: fix eword_t/uint64_t confusion
2017-03-20Git 2.12.1Libravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20push: mention "push.default=tracking" in the documentationLibravatar Ævar Arnfjörð Bjarmason1-0/+2
Change the documentation for push.tracking=* to re-include a mention of what "tracking" does. The "tracking" option was renamed to "upstream" back in 53c4031 ("push.default: Rename 'tracking' to 'upstream'", 2011-02-16), this section was then subsequently rewritten in 87a70e4 ("config doc: rewrite push.default section", 2013-06-19) to remove any mention of "tracking". Maybe we should just warn or die nowadays if this option is in the config, but I had some old config of mine use this option, I'd forgotten that it was a synonym, and nothing in git's documentation mentioned that. That's bad, either we shouldn't support it at all, or we should document what it does. This patch does the latter. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20git-commit.txt: list post-rewrite in HOOKS sectionLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The hook was added in a86ed83cce (Merge branch 'tr/notes-display' - 2010-03-24), which updated githooks.txt but not git-commit.txt. git-commit.txt was later updated in e858af6d50 (commit: document a couple of options - 2012-06-08). Since this commit focused on command line options, this section was probably forgotten. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20doc: change erroneous --[no]-whatever into --[no-]whateverLibravatar Ævar Arnfjörð Bjarmason2-2/+2
Change these two obvious typos to be in line with the rest of the documentation, which uses the correct --[no-]whatever form. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-16Preparing for 2.12.1Libravatar Junio C Hamano3-2/+43
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-16Merge branch 'js/realpath-pathdup-fix' into maintLibravatar Junio C Hamano10-18/+26
Git v2.12 was shipped with an embarrassing breakage where various operations that verify paths given from the user stopped dying when seeing an issue, and instead later triggering segfault. ... and then to down to 'maint'. * js/realpath-pathdup-fix: real_pathdup(): fix callsites that wanted it to die on error t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREE
2017-03-16Merge branch 'mm/two-more-xstrfmt' into maintLibravatar Junio C Hamano2-11/+9
Code clean-up and a string truncation fix. * mm/two-more-xstrfmt: bisect_next_all: convert xsnprintf to xstrfmt stop_progress_msg: convert xsnprintf to xstrfmt
2017-03-16Merge branch 'vn/line-log-memcpy-size-fix' into maintLibravatar Junio C Hamano1-1/+2
The command-line parsing of "git log -L" copied internal data structures using incorrect size on ILP32 systems. * vn/line-log-memcpy-size-fix: line-log: use COPY_ARRAY to fix mis-sized memcpy
2017-03-16Merge branch 'ax/line-log-range-merge-fix' into maintLibravatar Junio C Hamano2-8/+17
The code to parse "git log -L..." command line was buggy when there are many ranges specified with -L; overrun of the allocated buffer has been fixed. * ax/line-log-range-merge-fix: line-log.c: prevent crash during union of too many ranges
2017-03-16Merge branch 'jk/add-i-patch-do-prompt' into maintLibravatar Junio C Hamano2-4/+22
The patch subcommand of "git add -i" was meant to have paths selection prompt just like other subcommand, unlike "git add -p" directly jumps to hunk selection. Recently, this was broken and "add -i" lost the paths selection dialog, but it now has been fixed. * jk/add-i-patch-do-prompt: add--interactive: fix missing file prompt for patch mode with "-i"
2017-03-16Merge branch 'jt/http-base-url-update-upon-redirect' into maintLibravatar Junio C Hamano3-0/+21
When a redirected http transport gets an error during the redirected request, we ignored the error we got from the server, and ended up giving a not-so-useful error message. * jt/http-base-url-update-upon-redirect: http: attempt updating base URL only if no error
2017-03-16Merge branch 'js/travis-32bit-linux' into maintLibravatar Junio C Hamano2-0/+51
Add 32-bit Linux variant to the set of platforms to be tested with Travis CI. * js/travis-32bit-linux: Travis: also test on 32-bit Linux
2017-03-16Merge branch 'jh/mingw-openssl-sha1' into maintLibravatar Junio C Hamano1-1/+0
Windows port wants to use OpenSSL's implementation of SHA-1 routines, so let them. * jh/mingw-openssl-sha1: mingw: use OpenSSL's SHA-1 routines
2017-03-16Merge branch 'jk/http-auth' into maintLibravatar Junio C Hamano1-4/+46
Reduce authentication round-trip over HTTP when the server supports just a single authentication method. * jk/http-auth: http: add an "auto" mode for http.emptyauth http: restrict auth methods to what the server advertises
2017-03-15submodule-config: correct error reporting for invalid ignore valueLibravatar Stefan Beller1-1/+1
As 'var' contains the whole value we get error messages that repeat the section and key currently: warning: Invalid parameter 'true' for config option 'submodule.submodule.plugins/hooks.ignore.ignore' Fix this by only giving the section name in the warning. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-14git-status: make porcelain more robustLibravatar Michael J Gruber1-4/+4
git status provides a porcelain mode for porcelain writers with a supposedly stable (plumbing) interface. 7a76c28ff2 ("status: disable translation when --porcelain is used", 2014-03-20) made sure that ahead/behind info is not translated (i.e. is stable). Make sure that the remaining two strings (initial commit, detached head) are stable, too. These changes are for the v1 porcelain interface. While we do have a perfectly stable v2 porcelain interface now, some tools (such as powerline-gitstatus) are written against v1 and profit from fixing v1 without any changes on their side. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-13http-walker: fix buffer underflow processing remote alternatesLibravatar Jeff King1-4/+7
If we parse a remote alternates (or http-alternates), we expect relative lines like: ../../foo.git/objects which we convert into "$URL/../foo.git/" (and then use that as a base for fetching more objects). But if the remote feeds us nonsense like just: ../ we will try to blindly strip the last 7 characters, assuming they contain the string "objects". Since we don't _have_ 7 characters at all, this results in feeding a small negative value to strbuf_add(), which converts it to a size_t, resulting in a big positive value. This should consistently fail (since we can't generall allocate the max size_t minus 7 bytes), so there shouldn't be any security implications. Let's fix this by using strbuf_strip_suffix() to drop the characters we want. If they're not present, we'll ignore the alternate (in theory we could use it as-is, but the rest of the http-walker code unconditionally tacks "objects/" back on, so it is it not prepared to handle such a case). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-08real_pathdup(): fix callsites that wanted it to die on errorLibravatar Johannes Schindelin9-18/+18
In 4ac9006f832 (real_path: have callers use real_pathdup and strbuf_realpath, 2016-12-12), we changed the xstrdup(real_path()) pattern to use real_pathdup() directly. The problem with this change is that real_path() calls strbuf_realpath() with die_on_error = 1 while real_pathdup() calls it with die_on_error = 0. Meaning that in cases where real_path() causes Git to die() with an error message, real_pathdup() is silent and returns NULL instead. The callers, however, are ill-prepared for that change, as they expect the return value to be non-NULL (and otherwise the function died with an appropriate error message). Fix this by extending real_pathdup()'s signature to accept the die_on_error flag and simply pass it through to strbuf_realpath(), and then adjust all callers after a careful audit whether they would handle NULLs well. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-08t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREELibravatar Johannes Schindelin1-0/+8
When GIT_WORK_TREE does not specify a valid path, we should error out, instead of crashing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>