summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-17MALLOC_CHECK: various clean-upsLibravatar Junio C Hamano2-6/+21
The most important in this change is to avoid affecting anything when test-lib is used from perf-lib. It also limits the effect of the MALLOC_CHECK only to what is run inside the actual test, and uses a fixed MALLOC_PERTURB_ in order to avoid hurting repeatability of the tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14Add MALLOC_CHECK_ and MALLOC_PERTURB_ libc env to the test suite for ↵Libravatar Elia Pinto1-0/+9
detecting heap corruption Recent versions of Linux libc (later than 5.4.23) and glibc (2.x) include a malloc() implementation which is tunable via environment variables. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). When MALLOC_CHECK_ is set to 3, a diagnostic message is printed on stderr and the program is aborted. Setting the MALLOC_PERTURB_ environment variable causes the malloc functions in libc to return memory which has been wiped and clear memory when it is returned. Of course this does not affect calloc which always does clear the memory. The reason for this exercise is, of course, to find code which uses memory returned by malloc without initializing it and code which uses code after it is freed. valgrind can do this but it's costly to run. The MALLOC_PERTURB_ exchanges the ability to detect problems in 100% of the cases with speed. The byte value used to initialize values returned by malloc is the byte value of the environment value. The value used to clear memory is the bitwise inverse. Setting MALLOC_PERTURB_ to zero disables the feature. This technique can find hard to detect bugs. It is therefore suggested to always use this flag (at least temporarily) when testing out code or a new distribution. But the test suite can use also valgrind(memcheck) via 'make valgrind' or 'make GIT_TEST_OPTS="--valgrind"'. Memcheck wraps client calls to malloc(), and puts a "red zone" on each end of each block in order to detect access overruns. Memcheck already detects double free() (up to the limit of the buffer which remembers pending free()). Thus memcheck subsumes all the documented coverage of MALLOC_CHECK_. If MALLOC_CHECK_ is set non-zero when running memcheck, then the overruns that might be detected by MALLOC_CHECK_ would be overruns on the wrapped blocks which include the red zones. Thus MALLOC_CHECK_ would be checking memcheck, and not the client. This is not useful, and actually is wasteful. The only possible [documented] advantage of using MALLOC_CHECK_ and memcheck together, would be if MALLOC_CHECK_ detected duplicate free() in more cases than memcheck because memcheck's buffer is too small. Therefore we don't use MALLOC_CHECK_ and valgrind(memcheck) at the same time. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14The sixth batch for 1.8.0Libravatar Junio C Hamano1-0/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14Merge branch 'nd/checkout-option-parsing-fix'Libravatar Junio C Hamano1-116/+158
The option parsing of "git checkout" had error checking, dwim and defaulting missing options, all mixed in the code, and issuing an appropriate error message with useful context was getting harder. Reorganize the code and allow giving a proper diagnosis when the user says "git checkout -b -t foo bar" (e.g. "-t" is not a good name for a branch). * nd/checkout-option-parsing-fix: checkout: reorder option handling checkout: move more parameters to struct checkout_opts checkout: pass "struct checkout_opts *" as const pointer
2012-09-14Merge branch 'mh/abspath'Libravatar Junio C Hamano3-20/+66
* mh/abspath: t0060: split absolute path test in two to exercise some of it on Windows t0060: verify that real_path() removes extra slashes real_path(): properly handle nonexistent top-level paths t0060: verify that real_path() works correctly with absolute paths real_path(): reject the empty string t0060: verify that real_path() fails if passed the empty string absolute_path(): reject the empty string t0060: verify that absolute_path() fails if passed the empty string t0060: move tests of real_path() from t0000 to here
2012-09-14Merge branch 'dj/fetch-all-tags'Libravatar Junio C Hamano2-0/+34
"git fetch --all", when passed "--no-tags", did not honor the "--no-tags" option while fetching from individual remotes (the same issue existed with "--tags", but combination "--all --tags" makes much less sense than "--all --no-tags"). * dj/fetch-all-tags: fetch --all: pass --tags/--no-tags through to each remote
2012-09-14Merge branch 'sn/ls-remote-get-url-doc'Libravatar Junio C Hamano2-1/+6
* sn/ls-remote-get-url-doc: ls-remote: document the '--get-url' option
2012-09-14Merge branch 'nd/i18n-status'Libravatar Junio C Hamano1-20/+28
* nd/i18n-status: status: remove i18n legos
2012-09-14Merge branch 'rj/path-cleanup'Libravatar Junio C Hamano7-30/+24
* rj/path-cleanup: Call mkpathdup() rather than xstrdup(mkpath(...)) Call git_pathdup() rather than xstrdup(git_path("...")) path.c: Use vsnpath() in the implementation of git_path() path.c: Don't discard the return value of vsnpath() path.c: Remove the 'git_' prefix from a file scope function
2012-09-14Merge branch 'rj/tap-fix'Libravatar Junio C Hamano4-63/+81
* rj/tap-fix: test-lib.sh: Suppress the "passed all ..." message if no tests run test-lib.sh: Add check for invalid use of 'skip_all' facility test-lib.sh: Fix some shell coding style violations t4016-*.sh: Skip all tests rather than each test t3902-*.sh: Skip all tests rather than each test t3300-*.sh: Fix a TAP parse error
2012-09-12Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano6-2199/+2394
* git://github.com/git-l10n/git-po: l10n: Update Swedish translation (1166t0f0u) l10n: vi.po: update to v1.7.12-146-g16d26 l10n: de.po: translate 2 new messages l10n: zh_CN.po: translate 2 new messages l10n: Update git.pot (2 new, 4 removed messages) l10n: vi.po & TEAMS: review Vietnamese translation
2012-09-13l10n: Update Swedish translation (1166t0f0u)Libravatar Peter Krefting1-342/+373
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2012-09-13Merge git://github.com/vnwildman/gitLibravatar Jiang Xin1-392/+422
* git://github.com/vnwildman/git: l10n: vi.po: update to v1.7.12-146-g16d26
2012-09-12Start merging the sixth batch for 1.8.0Libravatar Junio C Hamano1-33/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-12Merge branch 'maint'Libravatar Junio C Hamano1-0/+26
2012-09-12Merge branch 'jc/maint-checkout-fileglob-doc'Libravatar Junio C Hamano2-1/+30
Updated with help from Peff. * jc/maint-checkout-fileglob-doc: gitcli: contrast wildcard given to shell and to git gitcli: formatting fix Document file-glob for "git checkout -- '*.c'"
2012-09-12Merge branch 'sb/send-email-reconfirm-fix'Libravatar Junio C Hamano1-2/+4
* sb/send-email-reconfirm-fix: send-email: initial_to and initial_reply_to are both optional
2012-09-12Merge branch 'nd/maint-remote-remove'Libravatar Junio C Hamano5-9/+10
* nd/maint-remote-remove: remote: prefer subcommand name 'remove' to 'rm'
2012-09-12Merge branch 'nd/log-n-doc'Libravatar Junio C Hamano2-5/+4
* nd/log-n-doc: doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt
2012-09-12Merge branch 'kd/cvsimport-avoid-invalid-tag'Libravatar Junio C Hamano1-3/+30
"cvsimport" tried to create a tag taken from CVS without sufficiently sanitizing it, causing the import to fail when an invalid character in the tagname made underlying "git tag" to fail. * kd/cvsimport-avoid-invalid-tag: cvsimport: strip all inappropriate tag strings
2012-09-12Merge branch 'js/compat-itimer'Libravatar Junio C Hamano2-0/+23
Pieces to support compilation on __TANDEM. * js/compat-itimer: Add a no-op setitimer() wrapper
2012-09-12Merge branch 'js/compat-mkdir'Libravatar Junio C Hamano1-0/+6
Finishing touches to recently added wrapper for mkdir() that do not want to see trailing slashes. * js/compat-mkdir: Document MKDIR_WO_TRAILING_SLASH in Makefile
2012-09-12Further merging in preparation for 1.7.12.1Libravatar Junio C Hamano1-0/+26
Describe the following in the draft release notes: . jc/apply-binary-p0 . jc/dotdot-is-parent-directory . jc/maint-doc-checkout-b-always-takes-branch-name . jk/maint-http-half-auth-push . kk/maint-for-each-ref-multi-sort Yet to be merged before 1.7.12.1 are: . jk/config-warn-on-inaccessible-paths . jk/maint-quiet-is-synonym-to-s-in-log . mz/cherry-pick-cmdline-order Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-12Merge branch 'maint-1.7.11' into maintLibravatar Junio C Hamano19-162/+321
2012-09-12Merge branch 'jc/apply-binary-p0' into maint-1.7.11Libravatar Junio C Hamano2-46/+76
"git apply -p0" did not parse pathnames on "diff --git" line correctly. This caused patches that had pathnames in no other places to be mistakenly rejected (most notably, binary patch that does not rename nor change mode). Textual patches, renames or mode changes have preimage and postimage pathnames in different places in a form that can be parsed unambiguously and did not suffer from this problem. * jc/apply-binary-p0: apply: compute patch->def_name correctly under -p0
2012-09-12Merge branch 'jc/dotdot-is-parent-directory' into maint-1.7.11Libravatar Junio C Hamano5-4/+56
"git log .." errored out saying it is both rev range and a path when there is no disambiguating "--" is on the command line. Update the command line parser to interpret ".." as a path in such a case. * jc/dotdot-is-parent-directory: specifying ranges: we did not mean to make ".." an empty set
2012-09-12Merge branch 'jc/maint-doc-checkout-b-always-takes-branch-name' into ↵Libravatar Junio C Hamano1-3/+3
maint-1.7.11 The synopsis said "checkout [-B branch]" to make it clear the branch name is a parameter to the option, but the heading for the option description was "-B::", not "-B branch::", making the documentation misleading. * jc/maint-doc-checkout-b-always-takes-branch-name: doc: "git checkout -b/-B/--orphan" always takes a branch name
2012-09-12Merge branch 'jk/maint-http-half-auth-push' into maint-1.7.11Libravatar Junio C Hamano9-106/+171
Pushing to smart HTTP server with recent Git fails without having the username in the URL to force authentication, if the server is configured to allow GET anonymously, while requiring authentication for POST. * jk/maint-http-half-auth-push: http: prompt for credentials on failed POST http: factor out http error code handling t: test http access to "half-auth" repositories t: test basic smart-http authentication t/lib-httpd: recognize */smart/* repos as smart-http t/lib-httpd: only route auth/dumb to dumb repos t5550: factor out http auth setup t5550: put auth-required repo in auth/dumb
2012-09-12Merge branch 'kk/maint-for-each-ref-multi-sort' into maint-1.7.11Libravatar Junio C Hamano2-1/+13
"git for-each-ref" did not honor multiple "--sort=<key>" arguments correctly. * kk/maint-for-each-ref-multi-sort: for-each-ref: Fix sort with multiple keys t6300: test sort with multiple keys
2012-09-12Merge git://ozlabs.org/~paulus/gitkLibravatar Junio C Hamano1-0/+5
* git://ozlabs.org/~paulus/gitk: gitk: Fix GIT_TRACE issues
2012-09-12Merge branch 'da/gitk-reload-tag-contents'Libravatar Junio C Hamano1-8/+9
After overwriting a tag with a new tag, "Reread references" action in "gitk" correctly moved the marker in the display, but it failed to discard a cached contents of the tag (even "Reload" didn't). * da/gitk-reload-tag-contents: gitk: Rename 'tagcontents' to 'cached_tagcontent' gitk: Teach "Reread references" to reload tags gitk: Avoid Meta1-F5
2012-09-12Merge branch 'da/gitk-reload-tag-contents' of git://github.com/gitster/gitLibravatar Paul Mackerras1-6/+7
to get two commits from David Aguilar.
2012-09-11checkout: reorder option handlingLibravatar Nguyễn Thái Ngọc Duy1-77/+112
checkout operates in three different modes. On top of that it tries to be smart by guessing the branch name for switching. This results in messy option handling code. This patch reorders it so that - cmd_checkout() is responsible for parsing, preparing input and determining mode - Code of each mode is in checkout_paths() and checkout_branch(), where sanity checks are performed Another slight improvement is always print branch name (or commit name) when printing errors related ot them. This helps catch the case where an option is mistaken as branch/commit. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Second half of the fifth batch for 1.8.0Libravatar Junio C Hamano1-45/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Merge branch 'rj/test-regex'Libravatar Junio C Hamano4-0/+27
Git ships with a fall-back regexp implementation for platforms with buggy regexp library; give people a tool to see if they should be using it on their platform. * rj/test-regex: test-regex: Add a test to check for a bug in the regex routines
2012-09-11Merge branch 'jk/argv-array'Libravatar Junio C Hamano6-39/+58
Use argv-array API in "git fetch" implementation. * jk/argv-array: submodule: use argv_array instead of hand-building arrays fetch: use argv_array instead of hand-building arrays argv-array: fix bogus cast when freeing array argv-array: add pop function
2012-09-11Merge branch 'jc/merge-bases'Libravatar Junio C Hamano11-112/+184
Optimise the "merge-base" computation a bit, and also update its users that do not need the full merge-base information to call a cheaper subset. * jc/merge-bases: reduce_heads(): reimplement on top of remove_redundant() merge-base: "--is-ancestor A B" get_merge_bases_many(): walk from many tips in parallel in_merge_bases(): use paint_down_to_common() merge_bases_many(): split out the logic to paint history in_merge_bases(): omit unnecessary redundant common ancestor reduction http-push: use in_merge_bases() for fast-forward check receive-pack: use in_merge_bases() for fast-forward check in_merge_bases(): support only one "other" commit
2012-09-11Merge branch 'nd/i18n-index-pack'Libravatar Junio C Hamano1-10/+11
* nd/i18n-index-pack: i18n: mark more index-pack strings for translation
2012-09-11Merge branch 'jc/maint-ident-missing-human-name'Libravatar Junio C Hamano2-3/+20
"git show --format='%ci'" did not give timestamp correctly for commits created without human readable name on "committer" line. * jc/maint-ident-missing-human-name: split_ident_line(): make best effort when parsing author/committer line
2012-09-11Sync with maintLibravatar Junio C Hamano3-34/+70
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Further merging down for 1.7.12.1Libravatar Junio C Hamano1-0/+13
We will wait for a handful of other fixes that have graduated to the 'master' for 1.8.0 to be tested in the wild and then tag 1.7.12.1: . mz/cherry-pick-cmdline-order . jk/maint-quiet-is-synonym-to-s-in-log . jk/maint-http-half-auth-push . jc/apply-binary-p0 . jk/config-warn-on-inaccessible-paths . kk/maint-for-each-ref-multi-sort Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Sync with 1.7.11.6Libravatar Junio C Hamano32-392/+569
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Merge branch 'js/use-sc-open-max' into maintLibravatar Junio C Hamano1-7/+19
* js/use-sc-open-max: sha1_file.c: introduce get_max_fd_limit() helper
2012-09-11Merge branch 'js/no-curl-easy-strerror-on-old-curl' into maintLibravatar Junio C Hamano1-0/+2
* js/no-curl-easy-strerror-on-old-curl: http.c: don't use curl_easy_strerror prior to curl-7.12.0
2012-09-11Git 1.7.11.6Libravatar Junio C Hamano3-35/+58
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11Merge branch 'jc/maint-mergetool-style-fix' into maint-1.7.11Libravatar Junio C Hamano1-273/+308
* jc/maint-mergetool-style-fix: mergetool: style fixes
2012-09-11Merge branch 'sz/submodule-force-update' into maint-1.7.11Libravatar Junio C Hamano3-2/+21
* sz/submodule-force-update: Make 'git submodule update --force' always check out submodules.
2012-09-11Merge branch 'ph/stash-rerere' into maint-1.7.11Libravatar Junio C Hamano2-0/+39
* ph/stash-rerere: stash: invoke rerere in case of conflict test: git-stash conflict sets up rerere
2012-09-11Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11Libravatar Junio C Hamano1-0/+2
* jc/maint-sane-execvp-notdir: sane_execvp(): ignore non-directory on $PATH
2012-09-11Merge branch 'jc/maint-config-exit-status' into maint-1.7.11Libravatar Junio C Hamano3-6/+11
* jc/maint-config-exit-status: config: "git config baa" should exit with status 1