swh:1:snp:87728f882295b5ba27035837248a04c5be121c53

sort by:
Revision Author Date Message Commit Date
8f9aeb0 Git 2.12.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 March 2017, 19:59:15 UTC
75d4476 Merge branch 'ab/doc-no-option-notation-fix' into maint Doc fix. * ab/doc-no-option-notation-fix: doc: change erroneous --[no]-whatever into --[no-]whatever 24 March 2017, 19:57:55 UTC
ce9e617 Merge branch 'ab/push-default-doc-fix' into maint Doc fix. * ab/push-default-doc-fix: push: mention "push.default=tracking" in the documentation 24 March 2017, 19:57:54 UTC
7bd881f Merge branch 'nd/commit-hook-doc-fix' into maint Doc fix. * nd/commit-hook-doc-fix: git-commit.txt: list post-rewrite in HOOKS section 24 March 2017, 19:57:54 UTC
eb4e87c Merge branch 'jc/config-case-cmdline-take-2' into maint 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 24 March 2017, 19:57:54 UTC
ea7aa5a Merge branch 'jk/grep-no-index-fix' into maint 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 24 March 2017, 19:57:53 UTC
411a179 Merge branch 'jn/remote-helpers-with-git-dir' into maint "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 24 March 2017, 19:57:53 UTC
f3d5bbb Merge branch 'sb/submodule-config-parse-ignore-fix' into maint 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 24 March 2017, 19:57:52 UTC
f4d3af1 Merge branch 'jk/push-deadlock-regression-fix' into maint "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 24 March 2017, 19:57:52 UTC
296ab78 mailmap: use Michael J Gruber's new address 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> 24 March 2017, 19:30:27 UTC
8624735 Prepare for 2.12.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 March 2017, 22:04:12 UTC
71da2fb Merge branch 'jh/send-email-one-cc' into maint "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 21 March 2017, 22:03:30 UTC
7e02ec2 Merge branch 'jk/t6300-cleanup' into maint 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 21 March 2017, 22:03:30 UTC
d6bc22e Merge branch 'rs/commit-parsing-optim' into maint 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 21 March 2017, 22:03:29 UTC
93abd17 Merge branch 'jk/show-branch-lift-name-len-limit' into maint "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 21 March 2017, 22:03:29 UTC
f63df94 Merge branch 'jk/tempfile-ferror-fclose-confusion' into maint 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() 21 March 2017, 22:03:28 UTC
0d9f942 Merge branch 'rl/remote-allow-missing-branch-name-merge' into maint "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 21 March 2017, 22:03:28 UTC
d30ec1b Merge branch 'dt/gc-ignore-old-gc-logs' into maint 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 21 March 2017, 22:03:28 UTC
f4470f2 Merge branch 'jt/upload-pack-error-report' into maint "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 21 March 2017, 22:03:27 UTC
e36e28e Merge branch 'rs/sha1-file-plug-fallback-base-leak' into maint 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() 21 March 2017, 22:03:27 UTC
d46d432 Merge branch 'ss/remote-bzr-hg-placeholder-wo-python' into maint 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 21 March 2017, 22:03:27 UTC
cc8e385 Merge branch 'jc/diff-populate-filespec-size-only-fix' into maint "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() 21 March 2017, 22:03:26 UTC
36238fc Merge branch 'jk/http-walker-buffer-underflow-fix' into maint "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 21 March 2017, 22:03:25 UTC
1a61be2 Merge branch 'mg/status-porcelain-no-i18n' into maint "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 21 March 2017, 22:03:25 UTC
5c6bc96 Merge branch 'ps/docs-diffcore' into maint Doc update. * ps/docs-diffcore: docs/diffcore: unquote "Complete Rewrites" in headers docs/diffcore: fix grammar in diffcore-rename header 21 March 2017, 22:03:25 UTC
c157ae9 Merge branch 'ew/markdown-url-in-readme' into maint Doc update. * ew/markdown-url-in-readme: README: create HTTP/HTTPS links from URLs in Markdown 21 March 2017, 22:03:24 UTC
f56a439 Merge branch 'rj/remove-unused-mktemp' into maint Code cleanup. * rj/remove-unused-mktemp: wrapper.c: remove unused gitmkstemps() function wrapper.c: remove unused git_mkstemp() function 21 March 2017, 22:03:24 UTC
06c0ed7 Merge branch 'jk/ewah-use-right-type-in-sizeof' into maint Code clean-up. * jk/ewah-use-right-type-in-sizeof: ewah: fix eword_t/uint64_t confusion 21 March 2017, 22:03:24 UTC
1f6b1af Git 2.12.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 March 2017, 20:17:08 UTC
e4e016f push: mention "push.default=tracking" in the documentation 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> 20 March 2017, 17:59:43 UTC
baced9e git-commit.txt: list post-rewrite in HOOKS section 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> 20 March 2017, 17:53:29 UTC
2c7ee98 doc: change erroneous --[no]-whatever into --[no-]whatever 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> 20 March 2017, 17:04:57 UTC
7c9c2f8 Preparing for 2.12.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 March 2017, 21:01:20 UTC
2846ef3 Merge branch 'js/realpath-pathdup-fix' into maint 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 16 March 2017, 20:57:00 UTC
f989ac2 Merge branch 'mm/two-more-xstrfmt' into maint 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 16 March 2017, 20:56:43 UTC
3d0449d Merge branch 'vn/line-log-memcpy-size-fix' into maint 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 16 March 2017, 20:56:42 UTC
c5bd9e5 Merge branch 'ax/line-log-range-merge-fix' into maint 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 16 March 2017, 20:56:42 UTC
abe62a4 Merge branch 'jk/add-i-patch-do-prompt' into maint 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" 16 March 2017, 20:56:42 UTC
68e12d7 Merge branch 'jt/http-base-url-update-upon-redirect' into maint 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 16 March 2017, 20:56:42 UTC
8e87cbc Merge branch 'js/travis-32bit-linux' into maint 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 16 March 2017, 20:56:42 UTC
890d765 Merge branch 'jh/mingw-openssl-sha1' into maint 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 16 March 2017, 20:56:41 UTC
d880bfd Merge branch 'jk/http-auth' into maint 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 16 March 2017, 20:56:41 UTC
5ea3048 submodule-config: correct error reporting for invalid ignore value 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> 15 March 2017, 18:26:08 UTC
b9e2bc5 git-status: make porcelain more robust 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> 14 March 2017, 20:15:18 UTC
d61434a http-walker: fix buffer underflow processing remote alternates 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> 13 March 2017, 17:20:29 UTC
ce83ead real_pathdup(): fix callsites that wanted it to die on error 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> 08 March 2017, 22:38:41 UTC
aac3eaa t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREE 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> 08 March 2017, 22:38:22 UTC
d1a13d3 send-pack: report signal death of pack-objects If our pack-objects sub-process dies of a signal, then it likely didn't have a chance to write anything useful to stderr. The user may be left scratching their head why the push failed. Let's detect this situation and write something to stderr. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:58:36 UTC
ba69f92 send-pack: read "unpack" status even on pack-objects failure If the local pack-objects of a push fails, we'll tell the user about it. But one likely cause is that the remote index-pack stopped reading for some reason (because it didn't like our input, or encountered another error). In that case we'd expect the remote to report more details to us via the "unpack ..." status line. However, the current code just hangs up completely, and the user never sees it. Instead, let's call receive_unpack_status(), which will complain on stderr with whatever reason the remote told us. Note that if our pack-objects fails because the connection was severed or the remote just crashed entirely, then our packet_read_line() call may fail with "the remote end hung up unexpectedly". That's OK. It's a more accurate description than what we get now (which is just "some refs failed to push"). This should be safe from any deadlocks. At the point we make this call we'll have closed the writing end of the connection to the server (either by handing it off to a pack-objects which exited, explicitly in the stateless_rpc case, or by doing a half-duplex shutdown for a socket). So there should be no chance that the other side is waiting for the rest of our pack-objects input. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:57:39 UTC
40d05d0 send-pack: improve unpack-status error messages When the remote tells us that the "unpack" step failed, we show an error message. However, unless you are familiar with the internals of send-pack and receive-pack, it was not clear that this represented an error on the remote side. Let's re-word to make that more obvious. Likewise, when we got an unexpected packet from the other end, we complained with a vague message but did not actually show the packet. Let's fix that. And finally, neither message was marked for translation. The message from the remote probably won't be translated, but there's no reason we can't do better for the local half. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:54:48 UTC
f7cd74d send-pack: use skip_prefix for parsing unpack status This avoids repeating ourselves, and the use of magic numbers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:54:14 UTC
7c39df2 send-pack: extract parsing of "unpack" response After sending the pack, we call receive_status() which gets both the "unpack" line and the ref status. Let's break these into two functions so we can call the first part independently. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:51:20 UTC
6cdad1f receive-pack: fix deadlock when we cannot create tmpdir The err_fd descriptor passed to the unpack() function is intended to be handed off to the child index-pack, and our async muxer will read until it gets EOF. However, if we encounter an error before handing off the descriptor, we must manually close(err_fd). Otherwise we will be waiting for our muxer to finish, while the muxer is waiting for EOF on err_fd. We fixed an identical deadlock already in 49ecfa13f (receive-pack: close sideband fd on early pack errors, 2013-04-19). But since then, the function grew a new early-return in 722ff7f87 (receive-pack: quarantine objects until pre-receive accepts, 2016-10-03), when we fail to create a temporary directory. This return needs the same treatment. Reported-by: Horst Schirmeier <horst@schirmeier.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 March 2017, 22:51:03 UTC
3255e51 ewah: fix eword_t/uint64_t confusion The ewah subsystem typedefs eword_t to be uint64_t, but some code uses a bare uint64_t. This isn't a bug now, but it's a potential maintenance problem if the definition of eword_t ever changes. Let's use the correct type. Note that we can't use COPY_ARRAY() here because the source and destination point to objects of different sizes. For that reason we'll also skip the usual "sizeof(*dst)" and use the real type, which should make it more clear that there's something tricky going on. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 March 2017, 20:03:40 UTC
07f546c line-log: use COPY_ARRAY to fix mis-sized memcpy This memcpy meant to get the sizeof a "struct range", not a "range_set", as the former is what our array holds. Rather than swap out the types, let's convert this site to COPY_ARRAY, which avoids the problem entirely (and confirms that the src and dst types match). Note for curiosity's sake that this bug doesn't trigger on I32LP64 systems, but does on ILP32 systems. The mistaken "struct range_set" has two ints and a pointer. That's 16 bytes on LP64, or 12 on ILP32. The correct "struct range" type has two longs, which is also 16 on LP64, but only 8 on ILP32. Likewise an IL32P64 system would experience the bug. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 March 2017, 20:01:02 UTC
88dedd5 Travis: also test on 32-bit Linux When Git v2.9.1 was released, it had a bug that showed only on Windows and on 32-bit systems: our assumption that `unsigned long` can hold 64-bit values turned out to be wrong. This could have been caught earlier if we had a Continuous Testing set up that includes a build and test run on 32-bit Linux. Let's do this (and take care of the Windows build later). This patch asks Travis CI to install a Docker image with 32-bit libraries and then goes on to build and test Git using this 32-bit setup. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 March 2017, 19:19:09 UTC
aaae0bf line-log.c: prevent crash during union of too many ranges The existing implementation of range_set_union does not correctly reallocate memory, leading to a heap overflow when it attempts to union more than 24 separate line ranges. For struct range_set *out to grow correctly it must have out->nr set to the current size of the buffer when it is passed to range_set_grow. However, the existing implementation of range_set_union only updates out->nr at the end of the function, meaning that it is always zero before this. This results in range_set_grow never growing the buffer, as well as some of the union logic itself being incorrect as !out->nr is always true. The reason why 24 is the limit is that the first allocation of size 1 ends up allocating a buffer of size 24 (due to the call to alloc_nr in ALLOC_GROW). This goes some way to explain why this hasn't been caught before. Fix the problem by correctly updating out->nr after reallocating the range_set. As this results in out->nr containing the same value as the variable o, replace o with out->nr as well. Finally, add a new test to help prevent the problem reoccurring in the future. Thanks to Vegard Nossum for writing the test. Signed-off-by: Allan Xavier <allan.x.xavier@oracle.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 March 2017, 19:16:20 UTC
b8686c6 contrib: git-remote-{bzr,hg} placeholders don't need Python It does not make sense for these placeholder scripts to depend on Python just because the real scripts do. At the example of Git for Windows, we would not even be able to see those warnings as it does not ship with Python. So just use plain shell scripts instead. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 March 2017, 19:09:34 UTC
12426e1 diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec() Callers of diff_populate_filespec() can choose to ask only for the size of the blob without grabbing the blob data, and the function, after running lstat() when the filespec points at a working tree file, returns by copying the value in size field of the stat structure into the size field of the filespec when this is the case. However, this short-cut cannot be taken if the contents from the path needs to go through convert_to_git(), whose resulting real blob data may be different from what is in the working tree file. As "git diff --quiet" compares the .size fields of filespec structures to skip content comparison, this bug manifests as a false "there are differences" for a file that needs eol conversion, for example. Reported-by: Mike Crowe <mac@mcrowe.com> Helped-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 March 2017, 18:48:06 UTC
c852bd5 add--interactive: fix missing file prompt for patch mode with "-i" When invoked as "git add -i", each menu interactive menu option prompts the user to select a list of files. This includes the "patch" option, which gets the list before starting the hunk-selection loop. As "git add -p", it behaves differently, and jumps straight to the hunk selection loop. Since 0539d5e6d (i18n: add--interactive: mark patch prompt for translation, 2016-12-14), the "add -i" case mistakenly jumps to straight to the hunk-selection loop. Prior to that commit the distinction between the two cases was managed by the $patch_mode variable. That commit used $patch_mode for something else, and moved the old meaning to the "$cmd" variable. But it forgot to update the $patch_mode check inside patch_update_cmd() which controls the file-list behavior. The simplest fix would be to change that line to check $cmd. But while we're here, let's use a less obscure name for this flag: $patch_mode_only, a boolean which tells whether we are in full-interactive mode or only in patch-mode. Reported-by: Henrik Grubbström <grubba@grubba.org> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 March 2017, 18:10:38 UTC
bcd886d README: create HTTP/HTTPS links from URLs in Markdown Markdown supports automatic links by surrounding URLs with angle brackets, as documented in <https://daringfireball.net/projects/markdown/syntax#autolink> While we're at it, update URLs to avoid redirecting clients for git-scm.com (by using HTTPS) and public-inbox.org (by adding a trailing slash). Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 March 2017, 22:45:45 UTC
b2d593a wrapper.c: remove unused gitmkstemps() function The last call to the mkstemps() function was removed in commit 659488326 ("wrapper.c: delete dead function git_mkstemps()", 22-04-2016). In order to support platforms without mkstemps(), this functionality was provided, along with a Makefile build variable (NO_MKSTEMPS), by the gitmkstemps() function. Remove the dead code, along with the defunct build machinery. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 February 2017, 19:54:21 UTC
34de5e4 wrapper.c: remove unused git_mkstemp() function The last caller of git_mkstemp() was removed in commit 6fec0a89 ("verify_signed_buffer: use tempfile object", 16-06-2016). Since the introduction of the 'tempfile' APIs, along with git_mkstemp_mode, it is unlikely that new callers will materialize. Remove the dead code. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 February 2017, 19:54:14 UTC
8e27391 http: attempt updating base URL only if no error http.c supports HTTP redirects of the form http://foo/info/refs?service=git-upload-pack -> http://anything -> http://bar/info/refs?service=git-upload-pack (that is to say, as long as the Git part of the path and the query string is preserved in the final redirect destination, the intermediate steps can have any URL). However, if one of the intermediate steps results in an HTTP exception, a confusing "unable to update url base from redirection" message is printed instead of a Curl error message with the HTTP exception code. This was introduced by 2 commits. Commit c93c92f ("http: update base URLs when we see redirects", 2013-09-28) introduced a best-effort optimization that required checking if only the "base" part of the URL differed between the initial request and the final redirect destination, but it performed the check before any HTTP status checking was done. If something went wrong, the normal code path was still followed, so this did not cause any confusing error messages until commit 6628eb4 ("http: always update the base URL for redirects", 2016-12-06), which taught http to die if the non-"base" part of the URL differed. Therefore, teach http to check the HTTP status before attempting to check if only the "base" part of the URL differed. This commit teaches http_request_reauth to return early without updating options->base_url upon an error; the only invoker of this function that passes a non-NULL "options" is remote-curl.c (through "http_get_strbuf"), which only uses options->base_url for an informational message in the situations that this commit cares about (that is, when the return value is not HTTP_OK). The included test checks that the redirect scheme at the beginning of this commit message works, and that returning a 502 in the middle of the redirect scheme produces the correct result. Note that this is different from the test in commit 6628eb4 ("http: always update the base URL for redirects", 2016-12-06) in that this commit tests that a Git-shaped URL (http://.../info/refs?service=git-upload-pack) works, whereas commit 6628eb4 tests that a non-Git-shaped URL (http://.../info/refs/foo?service=git-upload-pack) does not work (even though Git is processing that URL) and is an error that is fatal, not silently swallowed. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 February 2017, 19:35:53 UTC
b803ae4 docs/diffcore: unquote "Complete Rewrites" in headers The gitdiffcore documentation quotes the term "Complete Rewrites" in headers for no real gain. This would make sense if the term could be easily confused if not properly grouped together. But actually, the term is quite obvious and thus does not really need any quoting, especially regarding that it is not used anywhere else. But more importanly, this brings up a bug when rendering man pages: when trying to render quotes inside of a section header, we end up with quotes which have been misaligned to the end of line. E.g. diffcore-break: For Splitting Up Complete Rewrites -------------------------------------------------- renders as DIFFCORE-BREAK: FOR SPLITTING UP COMPLETE REWRITES"" , which is obviously wrong. While this is fixable for the man pages by using double-quotes (e.g. ""COMPLETE REWRITES""), this again breaks it for our generated HTML pages. So fix the issue by simply dropping quotes inside of section headers, which is currently only done for the term "Complete Rewrites". Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 February 2017, 19:34:38 UTC
1aa3819 docs/diffcore: fix grammar in diffcore-rename header Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 February 2017, 19:34:36 UTC
f0252ca t6300: avoid creating refs/heads/HEAD In one test, we use "git checkout --orphan HEAD" to create an unborn branch. Confusingly, the resulting branch is named "refs/heads/HEAD". The original probably meant something like: git checkout --orphan orphaned-branch HEAD Let's just use "orphaned-branch" here to make this less confusing. Putting HEAD in the second argument is already implied. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 19:33:44 UTC
b072504 commit: don't check for space twice when looking for header Both standard_header_field() and excluded_header_field() check if there's a space after the buffer that's handed to them. We already check in the caller if that space is present. Don't bother calling the functions if it's missing, as they are guaranteed to return 0 in that case, and remove the now redundant checks from them. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 19:20:18 UTC
50a01cc commit: be more precise when searching for headers Search for a space character only within the current line in read_commit_extra_header_lines() instead of searching in the whole buffer (and possibly beyond, if it's not NUL-terminated) and then discarding any results after the end of the current line. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 19:20:17 UTC
886ddf4 sha1_file: release fallback base's memory in unpack_entry() If a pack entry that's used as a delta base is corrupt, unpack_entry() marks it as unusable and then searches the object again in the hope that it can be found in another pack or in a loose file. The memory for this external base object is never released. Free it after use. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 19:00:30 UTC
40a18fc http: add an "auto" mode for http.emptyauth This variable needs to be specified to make some types of non-basic authentication work, but ideally this would just work out of the box for everyone. However, simply setting it to "1" by default introduces an extra round-trip for cases where it _isn't_ useful. We end up sending a bogus empty credential that the server rejects. Instead, let's introduce an automatic mode, that works like this: 1. We won't try to send the bogus credential on the first request. We'll wait to get an HTTP 401, as usual. 2. After seeing an HTTP 401, the empty-auth hack will kick in only when we know there is an auth method available that might make use of it (i.e., something besides "Basic" or "Digest"). That should make it work out of the box, without incurring any extra round-trips for people hitting Basic-only servers. This _does_ incur an extra round-trip if you really want to use "Basic" but your server advertises other methods (the emptyauth hack will kick in but fail, and then Git will actually ask for a password). The auto mode may incur an extra round-trip over setting http.emptyauth=true, because part of the emptyauth hack is to feed this blank password to curl even before we've made a single request. Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 18:35:24 UTC
9d33439 send-email: only allow one address per body tag Adding comments after a tag in the body is a common practise (e.g. in the Linux kernel) and git-send-email has been supporting this for years by removing any trailing cruft after the address. After some recent changes, any trailing comment is now instead appended to the recipient name (with some random white space inserted) resulting in undesirable noise in the headers, for example: CC: "# 3 . 3 . x : 1b9508f : sched : Rate-limit newidle" <stable@vger.kernel.org> Revert to the earlier behaviour of discarding anything after the (first) address in a tag while parsing the body. Note that multiple addresses after are still allowed after a command line switch (and in a CC header field). Also note that --suppress-cc=self was never honoured when using multiple addresses in a tag. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 February 2017, 18:02:55 UTC
e7e07d5 Git 2.12 Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 February 2017, 18:49:58 UTC
cca4f20 Merge branch 'ps/doc-gc-aggressive-depth-update' Doc update. * ps/doc-gc-aggressive-depth-update: docs/git-gc: fix default value for `--aggressiveDepth` 24 February 2017, 18:48:10 UTC
dc9ded4 Merge branch 'bc/worktree-doc-fix-detached' Doc update. * bc/worktree-doc-fix-detached: Documentation: correctly spell git worktree --detach 24 February 2017, 18:48:10 UTC
c6788b1 Merge branch 'dr/doc-check-ref-format-normalize' Doc update. * dr/doc-check-ref-format-normalize: git-check-ref-format: clarify documentation for --normalize 24 February 2017, 18:48:09 UTC
eccf97c Merge branch 'gp/document-dotfiles-in-templates-are-not-copied' Doc update. * gp/document-dotfiles-in-templates-are-not-copied: init: document dotfiles exclusion on template copy 24 February 2017, 18:48:09 UTC
c0588fd Merge branch 'rt/align-add-i-help-text' Doc update. * rt/align-add-i-help-text: git add -i: replace \t with blanks in the help message 24 February 2017, 18:48:08 UTC
af4027f Merge branch 'bc/blame-doc-fix' Doc update. * bc/blame-doc-fix: Documentation: use brackets for optional arguments 24 February 2017, 18:48:08 UTC
7e82388 docs/git-gc: fix default value for `--aggressiveDepth` In commit 07e7dbf0d (gc: default aggressive depth to 50, 2016-08-11), the default aggressive depth of git-gc has been changed to 50. While git-config(1) has been updated to represent the new default value, git-gc(1) still mentions the old value. This patch fixes it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 February 2017, 17:59:12 UTC
cc24d7d Merge tag 'l10n-2.12.0-rnd2' of git://github.com/git-l10n/git-po l10n-2.12.0-rnd2 * tag 'l10n-2.12.0-rnd2' of git://github.com/git-l10n/git-po: (22 commits) l10n: zh_CN: for git v2.12.0 l10n round 2 l10n: Update Catalan translation l10n: pt_PT: update Portuguese tranlation l10n: sv.po: Update Swedish translation (3139t0f0u) l10n: de.po: translate 241 messages l10n: ko.po: Update Korean translation l10n: vi.po (3139t): Updated 2 new messages for rc1 l10n: fr.po: v2.12.0 round 2 3139t l10n: git.pot: v2.12.0 round 2 (2 new) l10n: vi.po: Updated Vietnamese translation (3137t) l10n: update Catalan translation l10n: sv.po: Update Swedish translation (3137t0f0u) l10n: fr.po: v2.11-rc0 first round l10n: ko.po: Update Korean translation l10n: fr.po: Fix a typo in the French translation l10n: fr.po: Remove gender specific adjectives l10n: fr.po: Fix typos l10n: git.pot: v2.12.0 round 1 (239 new, 15 removed) l10n: bg: Updated Bulgarian translation (2913t+0f+0u) l10n: fixes to Catalan translation ... 24 February 2017, 17:55:41 UTC
1a79b2f l10n: zh_CN: for git v2.12.0 l10n round 2 Translate 241 messages (3139t0f0u) for git v2.12.0-rc1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> 24 February 2017, 16:19:14 UTC
a14eee8 l10n: Update Catalan translation Signed-off-by: Jordi Mas <jmas@softcatala.org> 24 February 2017, 16:14:55 UTC
1274a15 config: use git_config_parse_key() in git_config_parse_parameter() The parsing of one-shot assignments of configuration variables that come from the command line historically was quite loose and allowed anything to pass. It also downcased everything in the variable name, even a three-level <section>.<subsection>.<variable> name in which the <subsection> part must be treated in a case sensitive manner. Existing git_config_parse_key() helper is used to parse the variable name that comes from the command line, i.e. "git config VAR VAL", and handles these details correctly. Replace the strbuf_tolower() call in git_config_parse_parameter() with a call to it to correct both issues. git_config_parse_key() does a bit more things that are not necessary for the purpose of this codepath (e.g. it allocates a separate buffer to return the canonicalized variable name because it takes a "const char *" input), but we are not in a performance-critical codepath here. Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 February 2017, 06:03:03 UTC
ee98df3 config: move a few helper functions up git_config_parse_key() implements the validation and downcasing of <section> and <variable> in "<section>[.<subsection>].<variable>" configuration variable name. Move it (and helpers it uses) a bit up so that it can be used by git_config_parse_parameter(), which is used to check configuration settings that are given on the command line (i.e. "git -c VAR=VAL cmd"), in a later patch. Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 February 2017, 22:44:07 UTC
bdb31ea upload-pack: report "not our ref" to client Make upload-pack report "not our ref" errors to the client as an "ERR" line. (If not, the client would be left waiting for a response when the server is already dead.) Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 February 2017, 20:14:40 UTC
840398f http: restrict auth methods to what the server advertises By default, we tell curl to use CURLAUTH_ANY, which does not limit its set of auth methods. However, this results in an extra round-trip to the server when authentication is required. After we've fed the credential to curl, it wants to probe the server to find its list of available methods before sending an Authorization header. We can shortcut this by limiting our http_auth_methods by what the server told us it supports. In some cases (such as when the server only supports Basic), that lets curl skip the extra probe request. The end result should look the same to the user, but you can use GIT_TRACE_CURL to verify the sequence of requests: GIT_TRACE_CURL=1 \ git ls-remote https://example.com/repo.git \ 2>&1 >/dev/null | egrep '(Send|Recv) header: (GET|HTTP|Auth)' Before this patch, hitting a Basic-only server like github.com results in: Send header: GET /repo.git/info/refs?service=git-upload-pack HTTP/1.1 Recv header: HTTP/1.1 401 Authorization Required Send header: GET /repo.git/info/refs?service=git-upload-pack HTTP/1.1 Recv header: HTTP/1.1 401 Authorization Required Send header: GET /repo.git/info/refs?service=git-upload-pack HTTP/1.1 Send header: Authorization: Basic <redacted> Recv header: HTTP/1.1 200 OK And after: Send header: GET /repo.git/info/refs?service=git-upload-pack HTTP/1.1 Recv header: HTTP/1.1 401 Authorization Required Send header: GET /repo.git/info/refs?service=git-upload-pack HTTP/1.1 Send header: Authorization: Basic <redacted> Recv header: HTTP/1.1 200 OK The possible downsides are: - This only helps for a Basic-only server; for a server with multiple auth options, curl may still send a probe request to see which ones are available (IOW, there's no way to say "don't probe, I already know what the server will say"). - The http_auth_methods variable is global, so this will apply to all further requests. That's acceptable for Git's usage of curl, though, which also treats the credentials as global. I.e., in any given program invocation we hit only one conceptual server (we may be redirected at the outset, but in that case that's whose auth_avail field we'd see). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 February 2017, 19:11:56 UTC
e06cdf1 l10n: pt_PT: update Portuguese tranlation Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> 23 February 2017, 17:14:55 UTC
e519ecc git add -i: replace \t with blanks in the help message Within the help message of 'git add -i', the 'diff' command uses one tab character and blanks to create the space between the name and the description while the others use blanks only. So if the tab size is not at 4 characters, this description will not be in range. Replace the tab character with blanks. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 February 2017, 20:51:00 UTC
2b35a9f Documentation: use brackets for optional arguments The documentation for git blame used vertical bars for optional arguments to -M and -C, which is unusual and potentially confusing. Since most man pages use brackets for optional items, and that's consistent with how we document the same options for git diff and friends, use brackets here, too. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 February 2017, 18:22:15 UTC
9993a7c Documentation: correctly spell git worktree --detach The option is “--detach”, but we accidentally spelled it “--detached” at one point in the man page. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Reported-by: Casey Rodarmor <casey@rodarmor.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 February 2017, 18:08:38 UTC
20690b2 remote: ignore failure to remove missing branch.<name>.merge It is not all too unusual for a branch to use "branch.<name>.remote" without "branch.<name>.merge". You may be using the 'push.default' configuration set to 'current', for example, and do $ git checkout -b side colleague/side $ git config branch.side.remote colleague However, "git remote rm" to remove the remote used in such a manner fails with "fatal: could not unset 'branch.<name>.merge'" because it assumes that a branch that has .remote defined must also have .merge defined. Detect the "cannot unset because it is not set to begin with" case and ignore it. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 February 2017, 21:57:41 UTC
115a40a git-check-ref-format: clarify documentation for --normalize Use of 'iff' may be confusing to people not familiar with this term. Improving the --normalize option's documentation to remove the use of 'iff', and clearly describe what happens when the condition is not met. Signed-off-by: Damien Regad <dregad@mantisbt.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 February 2017, 21:02:42 UTC
28159ae Merge branch 'master' of git://github.com/nafmo/git-l10n-sv * 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (3139t0f0u) 21 February 2017, 16:06:44 UTC
80ba04e Merge branch 'svn-escape-backslash' of git://bogomips.org/git-svn * 'svn-escape-backslash' of git://bogomips.org/git-svn: git-svn: escape backslashes in refnames 21 February 2017, 06:01:59 UTC
806f276 l10n: sv.po: Update Swedish translation (3139t0f0u) Signed-off-by: Peter Krefting <peter@softwolves.pp.se> 20 February 2017, 18:40:11 UTC
af4cf7e l10n: de.po: translate 241 messages Translate 241 messages came from git.pot update in 673bfad09 (l10n: git.pot: v2.12.0 round 1 (239 new, 15 removed)) and a4d94835a (l10n: git.pot: v2.12.0 round 2 (2 new)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Phillip Sz <phillip.szelat@gmail.com> 20 February 2017, 17:40:36 UTC
c245125 Merge branch 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko * 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko: l10n: ko.po: Update Korean translation 19 February 2017, 14:08:05 UTC
7cbeff0 Merge branch 'master' of https://github.com/vnwildman/git * 'master' of https://github.com/vnwildman/git: l10n: vi.po (3139t): Updated 2 new messages for rc1 19 February 2017, 14:04:41 UTC
7d6d957 l10n: ko.po: Update Korean translation Signed-off-by: Changwoo Ryu <cwryu@debian.org> 19 February 2017, 10:35:37 UTC
back to top