summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-29Merge branch 'ls/travis-homebrew-path-fix' into maintLibravatar Junio C Hamano1-1/+1
The procedure to build Git on Mac OS X for Travis CI hardcoded the internal directory structure we assumed HomeBrew uses, which was a no-no. The procedure has been updated to ask HomeBrew things we need to know to fix this. * ls/travis-homebrew-path-fix: travis-ci: ask homebrew for its path instead of hardcoding it
2016-09-29Merge branch 'js/regexec-buf' into maintLibravatar Junio C Hamano7-33/+53
Some codepaths in "git diff" used regexec(3) on a buffer that was mmap(2)ed, which may not have a terminating NUL, leading to a read beyond the end of the mapped region. This was fixed by introducing a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND extension. * js/regexec-buf: regex: use regexec_buf() regex: add regexec_buf() that can work on a non NUL-terminated string regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails
2016-09-29Merge branch 'nd/checkout-disambiguation' into maintLibravatar Junio C Hamano4-3/+36
"git checkout <word>" does not follow the usual disambiguation rules when the <word> can be both a rev and a path, to allow checking out a branch 'foo' in a project that happens to have a file 'foo' in the working tree without having to disambiguate. This was poorly documented and the check was incorrect when the command was run from a subdirectory. * nd/checkout-disambiguation: checkout: fix ambiguity check in subdir checkout.txt: document a common case that ignores ambiguation rules checkout: add some spaces between code and comment
2016-09-29Merge branch 'ep/doc-check-ref-format-example' into maintLibravatar Junio C Hamano1-2/+2
A shell script example in check-ref-format documentation has been fixed. * ep/doc-check-ref-format-example: git-check-ref-format.txt: fixup documentation
2016-09-29Merge branch 'mm/config-color-ui-default-to-auto' into maintLibravatar Junio C Hamano1-6/+12
Documentation for individual configuration variables to control use of color (like `color.grep`) said that their default value is 'false', instead of saying their default is taken from `color.ui`. When we updated the default value for color.ui from 'false' to 'auto' quite a while ago, all of them broke. This has been corrected. * mm/config-color-ui-default-to-auto: Documentation/config: default for color.* is color.ui
2016-09-29Merge branch 'jk/reduce-gc-aggressive-depth' into maintLibravatar Junio C Hamano2-2/+2
"git gc --aggressive" used to limit the delta-chain length to 250, which is way too deep for gaining additional space savings and is detrimental for runtime performance. The limit has been reduced to 50. * jk/reduce-gc-aggressive-depth: gc: default aggressive depth to 50
2016-09-29Merge branch 'jk/rebase-i-drop-ident-check' into maintLibravatar Junio C Hamano2-3/+47
Even when "git pull --rebase=preserve" (and the underlying "git rebase --preserve") can complete without creating any new commit (i.e. fast-forwards), it still insisted on having a usable ident information (read: user.email is set correctly), which was less than nice. As the underlying commands used inside "git rebase" would fail with a more meaningful error message and advice text when the bogus ident matters, this extra check was removed. * jk/rebase-i-drop-ident-check: rebase-interactive: drop early check for valid ident
2016-09-29Merge branch 'jt/format-patch-base-info-above-sig' into maintLibravatar Junio C Hamano2-9/+30
"git format-patch --base=..." feature that was recently added showed the base commit information after "-- " e-mail signature line, which turned out to be inconvenient. The base information has been moved above the signature line. * jt/format-patch-base-info-above-sig: format-patch: show base info before email signature
2016-09-29Merge branch 'ks/perf-build-with-autoconf' into maintLibravatar Junio C Hamano1-1/+7
Performance tests done via "t/perf" did not use the same set of build configuration if the user relied on autoconf generated configuration. * ks/perf-build-with-autoconf: t/perf/run: copy config.mak.autogen & friends to build area
2016-09-29Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' into maintLibravatar Junio C Hamano2-1/+26
"git diff -W" output needs to extend the context backward to include the header line of the current function and also forward to include the body of the entire current function up to the header line of the next one. This process may have to merge to adjacent hunks, but the code forgot to do so in some cases. * rs/xdiff-merge-overlapping-hunks-for-W-context: xdiff: fix merging of hunks with -W context and -u context
2016-09-29Merge branch 'ew/http-do-not-forget-to-call-curl-multi-remove-handle' into maintLibravatar Junio C Hamano1-11/+18
The http transport (with curl-multi option, which is the default these days) failed to remove curl-easy handle from a curlm session, which led to unnecessary API failures. * ew/http-do-not-forget-to-call-curl-multi-remove-handle: http: always remove curl easy from curlm session on release http: consolidate #ifdefs for curl_multi_remove_handle http: warn on curl_multi_add_handle failures
2016-09-29Merge branch 'jk/patch-ids-no-merges' into maintLibravatar Junio C Hamano1-0/+16
"git log --cherry-pick" used to include merge commits as candidates to be matched up with other commits, resulting a lot of wasted time. The patch-id generation logic has been updated to ignore merges to avoid the wastage. * jk/patch-ids-no-merges: patch-ids: refuse to compute patch-id for merge commit patch-ids: turn off rename detection
2016-09-29Merge branch 'js/git-gui-commit-gpgsign' into maintLibravatar Junio C Hamano1-0/+3
"git commit-tree" stopped reading commit.gpgsign configuration variable that was meant for Porcelain "git commit" in Git 2.9; we forgot to update "git gui" to look at the configuration to match this change. * js/git-gui-commit-gpgsign: git-gui: respect commit.gpgsign again
2016-09-29Merge branch 'jk/fix-remote-curl-url-wo-proto' into maintLibravatar Junio C Hamano2-1/+9
"git fetch http::/site/path" did not die correctly and segfaulted instead. * jk/fix-remote-curl-url-wo-proto: remote-curl: handle URLs without protocol
2016-09-29Merge branch 'sy/git-gui-i18n-ja' into maintLibravatar Junio C Hamano1-1309/+1438
Update Japanese translation for "git-gui". * sy/git-gui-i18n-ja: git-gui: update Japanese information git-gui: update Japanese translation git-gui: add Japanese language code git-gui: apply po template to Japanese translation git-gui: consistently use the same word for "blame" in Japanese git-gui: consistently use the same word for "remote" in Japanese
2016-09-29Merge branch 'mr/vcs-svn-printf-ulong' into maintLibravatar Junio C Hamano1-2/+2
Code cleanup. * mr/vcs-svn-printf-ulong: vcs-svn/fast_export: fix timestamp fmt specifiers
2016-09-29Merge branch 'rs/unpack-trees-reduce-file-scope-global' into maintLibravatar Junio C Hamano1-4/+5
Code cleanup. * rs/unpack-trees-reduce-file-scope-global: unpack-trees: pass checkout state explicitly to check_updates()
2016-09-29Merge branch 'rs/strbuf-remove-fix' into maintLibravatar Junio C Hamano1-1/+1
Code cleanup. * rs/strbuf-remove-fix: strbuf: use valid pointer in strbuf_remove()
2016-09-29Merge branch 'rs/checkout-some-states-are-const' into maintLibravatar Junio C Hamano1-3/+3
Code cleanup. * rs/checkout-some-states-are-const: checkout: constify parameters of checkout_stage() and checkout_merged()
2016-09-29Merge branch 'bw/pathspec-remove-unused-extern-decl' into maintLibravatar Junio C Hamano1-2/+0
Code cleanup. * bw/pathspec-remove-unused-extern-decl: pathspec: remove unnecessary function prototypes
2016-09-22travis-ci: ask homebrew for its path instead of hardcoding itLibravatar Lars Schneider1-1/+1
The TravisCI macOS build is broken because homebrew (a macOS dependency manager) changed its internal directory structure [1]. This is a problem because we modify the Perforce dependencies in the homebrew repository before installing them. Fix it by asking homebrew for its path instead of hardcoding it. [1] https://github.com/Homebrew/brew/commit/0a09ae30f8b6117ad699b4a0439010738989c547 Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21regex: use regexec_buf()Libravatar Johannes Schindelin5-33/+17
The new regexec_buf() function operates on buffers with an explicitly specified length, rather than NUL-terminated strings. We need to use this function whenever the buffer we want to pass to regexec(3) may have been mmap(2)ed (and is hence not NUL-terminated). Note: the original motivation for this patch was to fix a bug where `git diff -G <regex>` would crash. This patch converts more callers, though, some of which allocated to construct NUL-terminated strings, or worse, modified buffers to temporarily insert NULs while calling regexec(3). By converting them to use regexec_buf(), the code has become much cleaner. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21regex: add regexec_buf() that can work on a non NUL-terminated stringLibravatar Johannes Schindelin2-1/+15
We just introduced a test that demonstrates that our sloppy use of regexec() on a mmap()ed area can result in incorrect results or even hard crashes. So what we need to fix this is a function that calls regexec() on a length-delimited, rather than a NUL-terminated, string. Happily, there is an extension to regexec() introduced by the NetBSD project and present in all major regex implementation including Linux', MacOSX' and the one Git includes in compat/regex/: by using the (non-POSIX) REG_STARTEND flag, it is possible to tell the regexec() function that it should only look at the offsets between pmatch[0].rm_so and pmatch[0].rm_eo. That is exactly what we need. Since support for REG_STARTEND is so widespread by now, let's just introduce a helper function that always uses it, and tell people on a platform whose regex library does not support it to use the one from our compat/regex/ directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21regex: -G<pattern> feeds a non NUL-terminated string to regexec() and failsLibravatar Johannes Schindelin1-0/+22
When our pickaxe code feeds file contents to regexec(), it implicitly assumes that the file contents are read into implicitly NUL-terminated buffers (i.e. that we overallocate by 1, appending a single '\0'). This is not so. In particular when the file contents are simply mmap()ed, we can be virtually certain that the buffer is preceding uninitialized bytes, or invalid pages. Note that the test we add here is known to be flakey: we simply cannot know whether the byte following the mmap()ed ones is a NUL or not. Typically, on Linux the test passes. On Windows, it fails virtually every time due to an access violation (that's a segmentation fault for you Unix-y people out there). And Windows would be correct: the regexec() call wants to operate on a regular, NUL-terminated string, there is no NUL in the mmap()ed memory range, and it is undefined whether the next byte is even legal to access. When run with --valgrind it demonstrates quite clearly the breakage, of course. Being marked with `test_expect_failure`, this test will sometimes be declare "TODO fixed", even if it only passes by mistake. This test case represents a Minimal, Complete and Verifiable Example of a breakage reported by Chris Sidi. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21git-check-ref-format.txt: fixup documentationLibravatar Elia Pinto1-2/+2
die is not a standard shell function. Use a different shell code for the example. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21checkout: fix ambiguity check in subdirLibravatar Nguyễn Thái Ngọc Duy3-2/+23
The two functions in parse_branchname_arg(), verify_non_filename and check_filename, need correct prefix in order to reconstruct the paths and check for their existence. With NULL prefix, they just check paths at top dir instead. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-21checkout.txt: document a common case that ignores ambiguation rulesLibravatar Nguyễn Thái Ngọc Duy1-0/+12
Normally we err on the safe side: if something can be seen as both an SHA1 and a pathspec, we stop and scream. In checkout, there is one exception added in 859fdab (git-checkout: improve error messages, detect ambiguities. - 2008-07-23), to allow the common case "git checkout branch". Let's document this exception. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-19Start preparing for 2.10.1Libravatar Junio C Hamano2-1/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-19Merge branch 'sb/diff-cleanup' into maintLibravatar Junio C Hamano1-21/+10
Code cleanup. * sb/diff-cleanup: diff: remove dead code diff: omit found pointer from emit_callback diff.c: use diff_options directly
2016-09-19Merge branch 'ah/misc-message-fixes' into maintLibravatar Junio C Hamano5-7/+7
Message cleanup. * ah/misc-message-fixes: unpack-trees: do not capitalize "working" git-merge-octopus: do not capitalize "octopus" git-rebase--interactive: fix English grammar cat-file: put spaces around pipes in usage string am: put spaces around pipe in usage string
2016-09-19Merge branch 'sb/transport-report-missing-submodule-on-stderr' into maintLibravatar Junio C Hamano1-1/+1
Message cleanup. * sb/transport-report-missing-submodule-on-stderr: transport: report missing submodule pushes consistently on stderr
2016-09-19Merge branch 'sb/xdiff-remove-unused-static-decl' into maintLibravatar Junio C Hamano1-9/+0
Code cleanup. * sb/xdiff-remove-unused-static-decl: xdiff: remove unneeded declarations
2016-09-19Merge branch 'js/t9903-chaining' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * js/t9903-chaining: t9903: fix broken && chain
2016-09-19Merge branch 'rs/hex2chr' into maintLibravatar Junio C Hamano6-78/+21
Code cleanup. * rs/hex2chr: introduce hex2chr() for converting two hexadecimal digits to a character
2016-09-19Merge branch 'rs/compat-strdup' into maintLibravatar Junio C Hamano4-19/+33
Code cleanup. * rs/compat-strdup: compat: move strdup(3) replacement to its own file
2016-09-19Merge branch 'jk/squelch-false-warning-from-gcc-o3' into maintLibravatar Junio C Hamano3-1/+3
Compilation fix. * jk/squelch-false-warning-from-gcc-o3: color_parse_mem: initialize "struct color" temporary error_errno: use constant return similar to error()
2016-09-19Merge branch 'ep/use-git-trace-curl-in-tests' into maintLibravatar Junio C Hamano4-9/+19
Update a few tests that used to use GIT_CURL_VERBOSE to use the newer GIT_TRACE_CURL. * ep/use-git-trace-curl-in-tests: t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var test-lib.sh: preserve GIT_TRACE_CURL from the environment t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var
2016-09-19Merge branch 'js/t6026-clean-up' into maintLibravatar Junio C Hamano1-0/+2
A test spawned a short-lived background process, which sometimes prevented the test directory from getting removed at the end of the script on some platforms. * js/t6026-clean-up: t6026-merge-attr: clean up background process at end of test case
2016-09-19Merge branch 'jc/forbid-symbolic-ref-d-HEAD' into maintLibravatar Junio C Hamano2-7/+16
"git symbolic-ref -d HEAD" happily removes the symbolic ref, but the resulting repository becomes an invalid one. Teach the command to forbid removal of HEAD. * jc/forbid-symbolic-ref-d-HEAD: symbolic-ref -d: do not allow removal of HEAD
2016-09-19Merge branch 'jc/submodule-anchor-git-dir' into maintLibravatar Junio C Hamano2-0/+36
Having a submodule whose ".git" repository is somehow corrupt caused a few commands that recurse into submodules loop forever. * jc/submodule-anchor-git-dir: submodule: avoid auto-discovery in prepare_submodule_repo_env()
2016-09-19Merge branch 'jk/test-lib-drop-pid-from-results' into maintLibravatar Junio C Hamano1-2/+2
The test framework left the number of tests and success/failure count in the t/test-results directory, keyed by the name of the test script plus the process ID. The latter however turned out not to serve any useful purpose. The process ID part of the filename has been removed. * jk/test-lib-drop-pid-from-results: test-lib: drop PID from test-results/*.count
2016-09-19Merge branch 'bh/diff-highlight-graph' into maintLibravatar Junio C Hamano5-6/+338
"diff-highlight" script (in contrib/) learned to work better with "git log -p --graph" output. * bh/diff-highlight-graph: diff-highlight: avoid highlighting combined diffs diff-highlight: add multi-byte tests diff-highlight: ignore test cruft diff-highlight: add support for --graph output diff-highlight: add failing test for handling --graph output diff-highlight: add some tests
2016-09-19Merge branch 'po/range-doc' into maintLibravatar Junio C Hamano5-51/+88
Clarify various ways to specify the "revision ranges" in the documentation. * po/range-doc: doc: revisions: sort examples and fix alignment of the unchanged doc: revisions: show revision expansion in examples doc: revisions - clarify reachability examples doc: revisions - define `reachable` doc: gitrevisions - clarify 'latter case' is revision walk doc: gitrevisions - use 'reachable' in page description doc: revisions: single vs multi-parent notation comparison doc: revisions: extra clarification of <rev>^! notation effects doc: revisions: give headings for the two and three dot notations doc: show the actual left, right, and boundary marks doc: revisions - name the left and right sides doc: use 'symmetric difference' consistently
2016-09-16Documentation/config: default for color.* is color.uiLibravatar Matthieu Moy1-6/+12
Since 4c7f181 (make color.ui default to 'auto', 2013-06-10), the default for color.* when nothing is set is 'auto' and we still claimed that the default was 'false'. Be more precise by saying explicitly that the default is to follow color.ui, and recall that the default is 'auto' to avoid one indirection for the reader. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-15t/perf/run: copy config.mak.autogen & friends to build areaLibravatar Kirill Smelkov1-1/+7
Otherwise for people who use autotools-based configure in main worktree, the performance testing results will be inconsistent as work and build trees could be using e.g. different optimization levels. See e.g. http://public-inbox.org/git/20160818175222.bmm3ivjheokf2qzl@sigill.intra.peff.net/ for example. NOTE config.status has to be copied because otherwise without it the build would want to run reconfigure this way loosing just copied config.mak.autogen. Signed-off-by: Kirill Smelkov <kirr@nexedi.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-15format-patch: show base info before email signatureLibravatar Josh Triplett2-9/+30
Any text below the "-- " for the email signature gets treated as part of the signature, and many mail clients will trim it from the quoted text for a reply. Move it above the signature, so people can reply to it more easily. Similarly, when producing the patch as a MIME attachment, the original code placed the base info after the attached part, which would be discarded. Move the base info to the end of the part, still inside the part boundary. Add tests for the exact format of the email signature, and add tests to ensure that the base info appears before the email signature when producing a plain-text output, and that it appears before the part boundary when producing a MIME attachment. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-14xdiff: fix merging of hunks with -W context and -u contextLibravatar René Scharfe2-1/+26
If the function context for a hunk (with -W) reaches the beginning of the next hunk then we need to merge these two -- otherwise we'd show some lines twice, which looks strange and even confuses git apply. We already do this checking and merging in xdl_emit_diff(), but forget to consider regular context (with -u or -U). Fix that by merging hunks already if function context of the first one touches or overlaps regular context of the second one. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-14vcs-svn/fast_export: fix timestamp fmt specifiersLibravatar Mike Ralphson1-2/+2
Two instances of %ld being used for unsigned longs Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-13unpack-trees: pass checkout state explicitly to check_updates()Libravatar René Scharfe1-4/+5
Add a parameter for the struct checkout variable to check_updates() instead of using a static global variable. Passing it explicitly makes object ownership and usage more easily apparent. And we get rid of a static variable; those can be problematic in library-like code. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-13checkout: constify parameters of checkout_stage() and checkout_merged()Libravatar René Scharfe1-3/+3
Document the fact that checkout_stage() and checkout_merged() don't change the objects passed to them by adding the modifier const. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>