summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-03-28tests: fix overeager scrubbing of environment variablesLibravatar Jens Lehmann1-1/+10
In commit 95a1d12e9b9f ("tests: scrub environment of GIT_* variables") all environment variables starting with "GIT_" were unset for the tests using a perl script rather than unsetting them one by one. Only three exceptions were made to make them work as before: "GIT_TRACE*", "GIT_DEBUG*" and "GIT_USE_LOOKUP". Unfortunately some environment variables used by the test framework itself were not added to the exceptions and thus stopped working when given before the make command instead of after it. Those are: - GIT_NOTES_TIMING_TESTS - GIT_PATCHID_TIMING_TESTS - GIT_PROVE_OPTS - GIT_REMOTE_SVN_TEST_BIG_FILES - GIT_SKIP_TESTS - GIT_TEST* - GIT_VALGRIND_OPTIONS I noticed that when skipping a test the way I was used to suddenly failed: GIT_SKIP_TESTS='t1234' GIT_TEST_OPTS='--root=/dev/shm' make -j10 test This should work according to t/README, but didn't anymore, so let's fix that by adding them to the exception list. And to avoid having a long regexp put the exceptions in a separate variable using nicer formatting. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Thanks-to: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-26Merge branch 'mg/rev-list-n-parents'Libravatar Junio C Hamano1-10/+108
* mg/rev-list-n-parents: tests: avoid nonportable {foo,bar} glob rev-list --min-parents,--max-parents: doc, test and completion revision.c: introduce --min-parents and --max-parents options t6009: use test_commit() from test-lib.sh
2011-03-26Merge branch 'jk/checkout-orphan-warning'Libravatar Junio C Hamano1-0/+47
* jk/checkout-orphan-warning: checkout: tweak detached-orphan warning format checkout: clear commit marks after detached-orphan check checkout: add basic tests for detached-orphan warning
2011-03-26Merge branch 'jc/maint-rerere-in-workdir'Libravatar Junio C Hamano1-0/+55
* jc/maint-rerere-in-workdir: rerere: make sure it works even in a workdir attached to a young repository
2011-03-26Merge branch 'svn-fe' of git://repo.or.cz/git/jrnLibravatar Junio C Hamano2-22/+117
* 'svn-fe' of git://repo.or.cz/git/jrn: vcs-svn: handle log message with embedded NUL vcs-svn: avoid unnecessary copying of log message and author vcs-svn: remove buffer_read_string vcs-svn: make reading of properties binary-safe
2011-03-26vcs-svn: handle log message with embedded NULLibravatar Jonathan Nieder1-0/+77
Pass the log message by strbuf instead of as a C-style string and use fwrite instead of printf to write it to fast-import so embedded '\0' bytes can be preserved. Currently "git log" doesn't show the embedded NULs but "git cat-file commit" can. While at it, stop including system headers from repo_tree.h. git source files need to include git-compat-util.h (or cache.h or builtin.h) sooner to ensure the appropriate feature test macros are defined. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-26vcs-svn: remove buffer_read_stringLibravatar Jonathan Nieder1-22/+13
All previous users of buffer_read_string have already been converted to use the more intuitive buffer_read_binary, so remove the old API to avoid some confusion. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-26vcs-svn: make reading of properties binary-safeLibravatar Jonathan Nieder1-0/+27
svn-fe errors out on revision 59151 of the ASF repository: fatal: invalid dump: unexpected end of file The proximate cause is a property with an embedded NUL character. Previously such anomalies were ignored but commit c9d1c8ba (2010-12-28) introduced a check strlen(val) == len to avoid reading uninitialized data when a property list ends early and unfortunately this test does not distinguish between "foo" followed by EOF and the string "foo\0bar\0baz". Fix it by using buffer_read_binary to read to a strbuf and checking the actual length read. Most consumers of properties still use C-style strings, so in practice an author or log message with embedded NULs will be truncated, but a least this way svn-fe won't error out (fixing the regression). Reported-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-25t7607: clean up stray untracked fileLibravatar Jeff King1-1/+2
This file ends up conflicting with the test just after it (causing the "git merge" to fail). Neither test is to blame for the bug, though. It looks like the merge in 1a9fe45 (Merge branch 'tr/merge-unborn-clobber', 2011-02-09) is what caused the conflict. We didn't notice because the follow-on test is already marked as expect_failure (even though it has since been fixed, and now succeeds once the untracked file is moved out of the way). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-25t7607: mark known breakage in test 11 as fixedLibravatar Jeff King1-1/+1
This was fixed by 1d718a51 (do not overwrite untracked symlinks, 2011-02-20). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-24tests: avoid nonportable {foo,bar} globLibravatar Jonathan Nieder1-8/+8
Unlike bash and ksh, dash and busybox ash do not support brace expansion (as in 'echo {hello,world}'). So when dash is sh, t6009.13 (set up dodecapus) ends up pass a string beginning with "root{1,2," to "git merge" verbatim and the test fails. Fix it by introducing a variable to hold the list of parents for the dodecapus and populating it in a more low-tech way. While at it, simplify a little by combining this setup code with the test it sets up for. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-23rerere: make sure it works even in a workdir attached to a young repositoryLibravatar Junio C Hamano1-0/+55
The git-new-workdir script in contrib/ makes a new work tree by sharing many subdirectories of the .git directory with the original repository. When rerere.enabled is set in the original repository, but the user has not encountered any conflicts yet, the original repository may not yet have .git/rr-cache directory. When rerere wants to run in a new work tree created from such a young original repository, it fails to mkdir(2) .git/rr-cache that is a symlink to a yet-to-be-created directory. There are three possible approaches to this: - A naive solution is not to create a symlink in the git-new-workdir script to a directory the original does not have (yet). This is not a solution, as we tend to lazily create subdirectories of .git/, and having rerere.enabled configuration set is a strong indication that the user _wants_ to have this lazy creation to happen; - We could always create .git/rr-cache upon repository creation. This is tempting but will not help people with existing repositories. - Detect this case by seeing that mkdir(2) failed with EEXIST, checking that the path is a symlink, and try running mkdir(2) on the link target. This patch solves the issue by doing the third one. Strictly speaking, this is incomplete. It does not attempt to handle relative symbolic link that points into the original repository, but this is good enough to help people who use contrib/workdir/git-new-workdir script. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-23Merge branch 'pk/stash-apply-status-relative'Libravatar Junio C Hamano1-0/+19
* pk/stash-apply-status-relative: Add test: git stash shows status relative to current dir git stash: show status relative to current directory
2011-03-23Merge branch 'jc/maint-diff-q-filter'Libravatar Junio C Hamano1-0/+7
* jc/maint-diff-q-filter: diff --quiet: disable optimization when --diff-filter=X is used
2011-03-23Merge branch 'pw/p4'Libravatar Junio C Hamano1-0/+23
* pw/p4: git-p4: test sync new branch git-p4: fix sync new branch regression
2011-03-23rev-list --min-parents,--max-parents: doc, test and completionLibravatar Michael J Gruber1-1/+106
This also adds test for "--merges" and "--no-merges" which we did not have so far. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-22Merge branch 'mg/rev-list-one-side-only'Libravatar Junio C Hamano1-8/+105
* mg/rev-list-one-side-only: git-log: put space after commit mark t6007: test rev-list --cherry log --cherry: a synonym rev-list: documentation and test for --cherry-mark revision.c: introduce --cherry-mark rev-list/log: factor out revision mark generation rev-list: --left/right-only are mutually exclusive rev-list: documentation and test for --left/right-only t6007: Make sure we test --cherry-pick revlist.c: introduce --left/right-only for unsymmetric picking
2011-03-22Merge branch 'jn/test-sanitize-git-env'Libravatar Junio C Hamano4-33/+8
* jn/test-sanitize-git-env: tests: scrub environment of GIT_* variables config: drop support for GIT_CONFIG_NOGLOBAL gitattributes: drop support for GIT_ATTR_NOGLOBAL tests: suppress system gitattributes tests: stop worrying about obsolete environment variables
2011-03-22Merge branch 'jc/maint-rev-list-culled-boundary'Libravatar Junio C Hamano1-0/+20
* jc/maint-rev-list-culled-boundary: list-objects.c: don't add an unparsed NULL as a pending tree Conflicts: list-objects.c
2011-03-22Merge branch 'jc/maint-fetch-alt'Libravatar Junio C Hamano1-0/+66
* jc/maint-fetch-alt: fetch-pack: objects in our alternates are available to us refs_from_alternate: helper to use refs from alternates Conflicts: builtin/receive-pack.c
2011-03-21t6009: use test_commit() from test-lib.shLibravatar Michael J Gruber1-11/+4
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-20Merge branch 'maint'Libravatar Junio C Hamano2-1/+9
* maint: Update draft release notes to 1.7.4.2 Work around broken ln on solaris as used in t8006 t/README: Add a note about running commands under valgrind
2011-03-20Merge branch 'so/submodule-no-update-first-time' into maintLibravatar Junio C Hamano1-0/+52
* so/submodule-no-update-first-time: t7406: "git submodule update {--merge|--rebase]" with new submodules submodule: no [--merge|--rebase] when newly cloned
2011-03-20Merge branch 'mo/perl-bidi-pipe-envfix' into maintLibravatar Junio C Hamano1-0/+10
* mo/perl-bidi-pipe-envfix: perl: command_bidi_pipe() method should set-up git environmens
2011-03-20Merge branch 'ae/better-template-failure-report' into maintLibravatar Junio C Hamano1-0/+13
* ae/better-template-failure-report: Improve error messages when temporary file creation fails
2011-03-20Work around broken ln on solaris as used in t8006Libravatar Ben Walton1-1/+2
The test setup in t8006-blame-textconv.sh uses "ln -sf" to overwrite an existing symlink. Unfortunately, both /usr/bin/ln and /usr/xpg4/bin/ln on solaris 9 don't properly handle -f and -s used at the same time. This caused the test setup and subsequent checks to fail. Instead, remove the symlink and then create a new one in the setup code. The upstream Solaris bug (fixed in 10, but not 9) is documented here: http://bugs.opensolaris.org/view_bug.do?bug_id=4372462 Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-20Add test: git stash shows status relative to current dirLibravatar Piotr Krukowiecki1-0/+19
[jc: moved "cd subdir" inside subshell and fixed comparison with expected] Signed-off-by: Piotr Krukowiecki <piotr.krukowiecki@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-20t/README: Add a note about running commands under valgrindLibravatar Carlos Martín Nieto1-0/+7
The test suite runs valgrind with certain options activated. Add a note saying how to run commands under the same conditions as the test suite does. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-20checkout: clear commit marks after detached-orphan checkLibravatar Jeff King1-0/+13
When leaving a detached HEAD, we do a revision walk to make sure the commit we are leaving isn't being orphaned. However, this leaves crufty marks in the commit objects which can confuse later walkers, like the one in stat_tracking_info. Let's clean up after ourselves to prevent this conflict. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-20checkout: add basic tests for detached-orphan warningLibravatar Jeff King1-0/+34
Commit 8e2dc6ac added a warning when we leave a detached HEAD whose commit is not reachable from any ref tip. Let's add a few basic tests to make sure it works. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-19Merge branch 'mm/maint-log-n-with-diff-filtering'Libravatar Junio C Hamano4-0/+19
* mm/maint-log-n-with-diff-filtering: log: fix --max-count when used together with -S or -G
2011-03-19Merge branch 'ab/i18n-basic'Libravatar Junio C Hamano1-0/+9
* ab/i18n-basic: i18n: "make distclean" should clean up after "make pot" i18n: Makefile: "pot" target to extract messages marked for translation i18n: add stub Q_() wrapper for ngettext i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set i18n: add GETTEXT_POISON to simulate unfriendly translator i18n: add no-op _() and N_() wrappers commit, status: use status_printf{,_ln,_more} helpers commit: refer to commit template as s->fp wt-status: add helpers for printing wt-status lines Conflicts: builtin/commit.c
2011-03-19Merge branch 'jk/trace-sifter'Libravatar Junio C Hamano1-1/+1
* jk/trace-sifter: trace: give repo_setup trace its own key add packet tracing debug code trace: add trace_strbuf trace: factor out "do we want to trace" logic trace: refactor to support multiple env variables trace: add trace_vprintf
2011-03-19Merge branch 'jk/format-patch-multiline-header'Libravatar Junio C Hamano1-0/+84
* jk/format-patch-multiline-header: format-patch: rfc2047-encode newlines in headers format-patch: wrap long header lines strbuf: add fixed-length version of add_wrapped_text
2011-03-19grep: read patterns from stdin with -f -Libravatar René Scharfe1-0/+5
Support the well-know convention of reading standard input instead of a named file if "-" (dash) is specified. GNU grep does the same. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-17fetch-pack: objects in our alternates are available to usLibravatar Junio C Hamano1-1/+1
Use the helper function split from the receiving end of "git push" to allow the same optimization on the receiving end of "git fetch". Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2011-03-17refs_from_alternate: helper to use refs from alternatesLibravatar Junio C Hamano1-0/+66
The receiving end of "git push" advertises the objects that the repository itself does not use, but are at the tips of refs in other repositories whose object databases are used as alternates for it. This helps it avoid having to receive (and the pusher having to send) objects that are already available to the receiving repository via the alternates mechanism. Tweak the helper function that implements this feature, and move it to transport.[ch] for future reuse by other programs. The additional test demonstrates how this optimization is helping "git push", and "git fetch" is ignorant about it. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2011-03-17Name make_*_path functions more accuratelyLibravatar Carlos Martín Nieto1-5/+5
Rename the make_*_path functions so it's clearer what they do, in particlar make clear what the differnce between make_absolute_path and make_nonrelative_path is by renaming them real_path and absolute_path respectively. make_relative_path has an understandable name and is renamed to relative_path to maintain the name convention. The function calls have been replaced 1-to-1 in their usage. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-16Merge branch 'maint'Libravatar Junio C Hamano1-0/+6
* maint: Prepare draft release notes to 1.7.4.2 gitweb: highlight: replace tabs with spaces make_absolute_path: return the input path if it points to our buffer valgrind: ignore SSE-based strlen invalid reads diff --submodule: split into bite-sized pieces cherry: split off function to print output lines branch: split off function that writes tracking info and commit subject standardize brace placement in struct definitions compat: make gcc bswap an inline function enums: omit trailing comma for portability Conflicts: RelNotes
2011-03-16Merge branch 'jn/maint-commit-missing-template' into maintLibravatar Junio C Hamano1-3/+11
* jn/maint-commit-missing-template: commit: error out for missing commit message template
2011-03-16Merge branch 'lt/rename-no-extra-copy-detection' into maintLibravatar Junio C Hamano5-6/+6
* lt/rename-no-extra-copy-detection: diffcore-rename: improve estimate_similarity() heuristics diffcore-rename: properly honor the difference between -M and -C for_each_hash: allow passing a 'void *data' pointer to callback
2011-03-16Merge branch 'jk/diffstat-binary' into maintLibravatar Junio C Hamano1-0/+7
* jk/diffstat-binary: diff: don't retrieve binary blobs for diffstat diff: handle diffstat of rewritten binary files
2011-03-16Merge branch 'jn/test-terminal-punt-on-osx-breakage' into maintLibravatar Junio C Hamano1-3/+19
* jn/test-terminal-punt-on-osx-breakage: tests: skip terminal output tests on OS X
2011-03-16Merge branch 'jk/fail-null-clone' into maintLibravatar Junio C Hamano1-0/+13
* jk/fail-null-clone: clone: die when trying to clone missing local path
2011-03-16Merge branch 'mg/placeholders-are-lowercase' into maintLibravatar Junio C Hamano1-1/+1
* mg/placeholders-are-lowercase: Make <identifier> lowercase in Documentation Make <identifier> lowercase as per CodingGuidelines Make <identifier> lowercase as per CodingGuidelines Make <identifier> lowercase as per CodingGuidelines CodingGuidelines: downcase placeholders in usage messages
2011-03-16Merge branch 'mg/patch-id' into maintLibravatar Junio C Hamano1-0/+36
* mg/patch-id: git-patch-id: do not trip over "no newline" markers git-patch-id: test for "no newline" markers
2011-03-16Merge branch 'js/maint-merge-use-prepare-commit-msg-hook' into maintLibravatar Junio C Hamano1-0/+12
* js/maint-merge-use-prepare-commit-msg-hook: merge: honor prepare-commit-msg hook
2011-03-16diff --quiet: disable optimization when --diff-filter=X is usedLibravatar Junio C Hamano1-0/+7
The code notices that the caller does not want any detail of the changes and only wants to know if there is a change or not by specifying --quiet. And it breaks out of the loop when it knows it already found any change. When you have a post-process filter (e.g. --diff-filter), however, the path we found to be different in the previous round and set HAS_CHANGES bit may end up being uninteresting, and there may be no output at the end. The optimization needs to be disabled for such case. Note that the f245194 (diff: change semantics of "ignore whitespace" options, 2009-05-22) already disables this optimization by refraining from setting HAS_CHANGES when post-process filters that need to inspect the contents of the files (e.g. -S, -w) in diff_change() function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-16git-p4: test sync new branchLibravatar Pete Wyckoff1-0/+23
Add two new unit tests. One to test the feature that that was added in e32e00d, and another to test the regression that was fixed in the parent to this commit. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-16valgrind: ignore SSE-based strlen invalid readsLibravatar Carlos Martín Nieto1-0/+6
Some versions of strlen use SSE to speed up the calculation and load 4 bytes at a time, even if it means reading past the end of the allocated memory. This read is safe and when the strlen function is inlined, it is not replaced by valgrind, which reports a false-possitive. Tell valgrind to ignore this particular error, as the read is, in fact, safe. Current upstream-released version 3.6.1 is affected. Some distributions have this fixed in their latest versions. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>