summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2010-11-17Merge branch 'mg/make-prove'Libravatar Junio C Hamano2-1/+15
* mg/make-prove: test: allow running the tests under "prove"
2010-11-17Merge branch 'ak/submodule-sync'Libravatar Junio C Hamano1-1/+11
* ak/submodule-sync: submodule sync: Update "submodule.<name>.url" for empty directories
2010-11-17Merge branch 'jk/maint-rev-list-nul'Libravatar Junio C Hamano3-4/+12
* jk/maint-rev-list-nul: rev-list: handle %x00 NUL in user format
2010-11-17Merge branch 'ks/no-textconv-symlink'Libravatar Junio C Hamano2-12/+88
* ks/no-textconv-symlink: blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
2010-11-17Merge branch 'jn/gitweb-test'Libravatar Junio C Hamano2-2/+23
* jn/gitweb-test: gitweb/Makefile: Include gitweb/config.mak gitweb/Makefile: Add 'test' and 'test-installed' targets t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
2010-11-17Merge branch 'cb/diff-fname-optim'Libravatar Junio C Hamano1-0/+109
* cb/diff-fname-optim: diff: avoid repeated scanning while looking for funcname do not search functions for patch ID add rebase patch id tests
2010-11-17Merge branch 'jk/no-textconv-symlink'Libravatar Junio C Hamano1-0/+26
* jk/no-textconv-symlink: diff: don't use pathname-based diff drivers for symlinks
2010-11-17Merge branch 'maint'Libravatar Junio C Hamano1-0/+21
* maint: clean: remove redundant variable baselen Documentation/git-pull: clarify configuration Document that rev-list --graph triggers parent rewriting. clean: avoid quoting twice document sigchain api Keep together options controlling the behaviour of diffcore-rename. t3402: test "rebase -s<strategy> -X<opt>"
2010-11-14tests: use test_cmp instead of piping to diff(1)Libravatar Ævar Arnfjörð Bjarmason2-47/+94
Change submodule tests that piped to diff(1) to use test_cmp. The resulting unified diff is easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-14t7004-tag.sh: re-arrange git tag comment for clarityLibravatar Ævar Arnfjörð Bjarmason1-5/+15
Split the "message in editor has initial comment" test into three tests. The motivation is to be able to only skip the middle part under NO_GETTEXT_POISON. In addition the return value of 'git tag' was being returned. We now check that it's non-zero. I used ! instead of test_must_fail so that the GIT_EDITOR variable was only used in this command invocation, and because the surrounding tests use this style. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-11t3402: test "rebase -s<strategy> -X<opt>"Libravatar Junio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09Merge branch 'maint'Libravatar Junio C Hamano1-3/+7
* maint: Documentation: document show -s dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
2010-11-08dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkoutLibravatar Nguyễn Thái Ngọc Duy1-3/+7
Commit c84de70 (excluded_1(): support exclude files in index - 2009-08-20) tries to work around the fact that there is no directory/file information in index entries, therefore EXC_FLAG_MUSTBEDIR match would fail. Unfortunately the workaround is flawed. This fixes it. Reported-by: Thomas Rinderknecht <thomasr@sailguy.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-29t0003: properly quote $HOMELibravatar Thomas Rast1-1/+1
6df42ab (Add global and system-wide gitattributes, 2010-09-01) forgot to quote one instance of $HOME in the tests. This would be valid according to POSIX, but bash 4 helpfully declines to execute the command in question with an "ambiguous redirection" error. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-26Merge branch 'ab/send-email-perl'Libravatar Junio C Hamano1-1/+1
* ab/send-email-perl: send-email: extract_valid_address use qr// regexes send-email: is_rfc2047_quoted use qr// regexes send-email: use Perl idioms in while loop send-email: make_message_id use "require" instead of "use" send-email: send_message die on $!, not $? send-email: use (?:) instead of () if no match variables are needed send-email: sanitize_address use qq["foo"], not "\"foo\"" send-email: sanitize_address use $foo, not "$foo" send-email: use \E***\Q instead of \*\*\* send-email: cleanup_compose_files doesn't need a prototype send-email: unique_email_list doesn't need a prototype send-email: file_declares_8bit_cte doesn't need a prototype send-email: get_patch_subject doesn't need a prototype send-email: use lexical filehandles during sending send-email: use lexical filehandles for $compose send-email: use lexical filehandle for opendir Conflicts: git-send-email.perl
2010-10-26Merge branch 'sb/send-email-use-to-from-input'Libravatar Junio C Hamano1-0/+39
* sb/send-email-use-to-from-input: send-email: Don't leak To: headers between patches send-email: Use To: headers in patch files Conflicts: git-send-email.perl
2010-10-26Merge branch 'ab/require-perl-5.8'Libravatar Junio C Hamano2-1/+2
* ab/require-perl-5.8: perl: use "use warnings" instead of -w perl: bump the required Perl version to 5.8 from 5.6.[21]
2010-10-26Merge branch 'jp/send-email-to-cmd'Libravatar Junio C Hamano1-0/+18
* jp/send-email-to-cmd: git-send-email.perl: Add --to-cmd Conflicts: git-send-email.perl
2010-10-26Merge branch 'jf/merge-ignore-ws'Libravatar Junio C Hamano1-0/+186
* jf/merge-ignore-ws: merge-recursive: options to ignore whitespace changes merge-recursive --patience ll-merge: replace flag argument with options struct merge-recursive: expose merge options for builtin merge
2010-10-26test: allow running the tests under "prove"Libravatar Michael J Gruber2-1/+15
You can run "make DEFAULT_TEST_TARGET=prove test" to run the test under "prove" (or $(PROVE) if set). The output is a bit easier to read when running many tests in parallel. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Liked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Liked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19Merge branch 'maint'Libravatar Junio C Hamano2-7/+7
* maint: t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' Clarify and extend the "git diff" format documentation git-show-ref.txt: clarify the pattern matching documentation: git-config minor cleanups Update test script annotate-tests.sh to handle missing/extra authors
2010-10-19t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To'Libravatar Antonio Ospite1-1/+1
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19Update test script annotate-tests.sh to handle missing/extra authorsLibravatar Kevin Ballard1-6/+6
The current script used by annotate-tests.sh (used by t8001 and t8002) fails to emit a warning if any of the expected authors never show up in the output or if authors that show up in the output were never specified as expected. Update the script to fail in both of these scenarios. Helped-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13Merge branch 'maint'Libravatar Junio C Hamano3-20/+20
* maint: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info Documentation: No argument of ALLOC_GROW should have side-effects
2010-10-13rev-list: handle %x00 NUL in user formatLibravatar Jeff King3-4/+12
The code paths for showing commits in "git log" and "git rev-list --graph" correctly handle embedded NULs by looking only at the resulting strbuf's length, and never treating it as a C string. The code path for regular rev-list, however, used printf("%s"), which resulted in truncated output. This patch uses fwrite instead, like the --graph code path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13submodule sync: Update "submodule.<name>.url" for empty directoriesLibravatar Andreas Köhler1-1/+11
If a submodule directory has not been filled by "git submodule update" yet, then "git submodule sync" must still update the super-project's configuration for submodule.<name>.url. This situation occurs when switching between branches with a module from different urls and other branches without the submodule. Signed-off-by: Andreas Köhler <andi5.py@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13fast-import: Allow filemodify to set the rootLibravatar David Barr1-0/+21
v1.7.3-rc0~75^2 (Teach fast-import to import subtrees named by tree id, 2010-06-30) has a shortcoming - it doesn't allow the root to be set. Extend this behaviour by allowing the root to be referenced as the empty path, "". For a command (like filter-branch --subdirectory-filter) that wants to commit a lot of trees that already exist in the object db, writing undeltified objects as loose files only to repack them later can involve a significant amount of overhead. (23% slow-down observed on Linux 2.6.35, worse on Mac OS X 10.6) Fortunately we have fast-import (which is one of the only git commands that will write to a pack directly) but there is not an advertised way to tell fast-import to commit a given tree without unpacking it. This patch changes that, by allowing M 040000 <tree id> "" as a filemodify line in a commit to reset to a particular tree without any need to parse it. For example, M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 "" is a synonym for the deleteall command and the fast-import equivalent of git read-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 Signed-off-by: David Barr <david.barr@cordelta.com> Commit-message-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Tested-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13shell portability: no "export VAR=VAL"Libravatar Junio C Hamano3-20/+20
It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13gitweb: Fix test of highlighting support in t9500Libravatar Jakub Narebski1-5/+6
The commit 7ce896b (Enable highlight executable path as a configuration option, 2010-09-21) forgot to update t9500 test. While at it, describe highlight test better. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08t5503: fix typoLibravatar Michael J Gruber1-1/+1
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Merge branch 'maint'Libravatar Junio C Hamano1-3/+3
* maint: t/t3415: use && where applicable. SubmittingPatches: Document some extra tags used in commit messages
2010-10-06t/t3415: use && where applicable.Libravatar Yann Dirson1-3/+3
Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Make test script t9157 executableLibravatar Junio C Hamano1-0/+0
Fixes a buglet introduced by a3c75056d Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Merge branch 'bc/fix-cherry-pick-root'Libravatar Junio C Hamano1-0/+10
* bc/fix-cherry-pick-root: builtin/revert.c: don't dereference a NULL pointer
2010-10-06Merge branch 'maint'Libravatar Junio C Hamano2-1/+50
* maint: Documentation/git-clone: describe --mirror more verbosely do not depend on signed integer overflow work around buggy S_ISxxx(m) implementations xdiff: cast arguments for ctype functions to unsigned char init: plug tiny one-time memory leak diffcore-pickaxe.c: remove unnecessary curly braces t3020 (ls-files-error-unmatch): remove stray '1' from end of file setup: make sure git dir path is in a permanent buffer environment.c: remove unused variable git-svn: fix processing of decorated commit hashes git-svn: check_cherry_pick should exclude commits already in our history Documentation/git-svn: discourage "noMetadata"
2010-10-05Merge early part of git-svn into maintLibravatar Junio C Hamano1-0/+50
* commit 'git-svn/master~1': git-svn: fix processing of decorated commit hashes git-svn: check_cherry_pick should exclude commits already in our history Documentation/git-svn: discourage "noMetadata"
2010-10-04send-email: Don't leak To: headers between patchesLibravatar Stephen Boyd1-0/+15
If the first patch in a series has a To: header in the file and the second patch in the series doesn't the address from the first patch will be part of the To: addresses in the second patch. Fix this by treating the to list like the cc list. Have an initial to list come from the command line, user input and config options. Then build up a to list from each patch and concatenate the two together before sending the patch. Finally, reset the list after sending each patch so the To: headers from a patch don't get used for the next one. Reported-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03t3020 (ls-files-error-unmatch): remove stray '1' from end of fileLibravatar Elijah Newren1-1/+0
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03Side-step MSYS-specific path "corruption" leading to t5560 failure.Libravatar Eric Sunshine1-2/+1
Upon program invocation, MSYS converts environment variables containing path-like values from Unix-style to DOS-style under the assumption that the program being invoked understands only DOS-style pathnames. For instance, the Unix-style path /msysgit is translated to c:/msysgit. For test t5560, the path being requested from git-http-backend is specified via environment variable PATH_INFO as a URL path of the form /repo.git/foobar, which git-http-backend combines with GIT_PROJECT_ROOT to determine the actual physical path within the repository. This is a case where MSYS's conversion of the path-like value of PATH_INFO causes harm, for two reasons. First, the resulting converted path, when joined with GIT_PROJECT_ROOT is bogus (for instance, "C:/msysgit/git/t/trash-zzz/C:/msysgit/repo.git/HEAD"). Second, the converted PATH_INFO path is rejected by git-http-backend as an 'alias' due to validation failure on the part of daemon_avoid_alias(). Unfortunately, the standard work-around of doubling the leading slash (i.e. //repo.git/foobar) to suppress MSYS path conversion works only for command-line arguments, but not for environment variables. Consequently, side step the problem by instead passing git-http-backend an already-constructed full path rather than components GIT_PROJECT_ROOT and PATH_INFO. Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-03Side-step sed line-ending "corruption" leading to t6038 failure.Libravatar Eric Sunshine1-1/+3
By default, MSYS sed throws away CR from CRLF line-endings. Tests t6038.5 and t6038.6 employ sed to normalize conflict output of git-merge for validation purposes. These tests expect CRLF line-endings to be present in the normalized output of git-merge, and thus fail when sed undesirably removes CR. Fix by employing sed's -b/--binary switch to suppress its default behavior of dropping CR characters. Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-01Skip 'git archive --remote' test on msysGitLibravatar Pat Thoyts1-1/+1
This test requires git daemon support which is not available on msysgit Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-01Do not strip CR when grepping HTTP headers.Libravatar Pat Thoyts2-0/+3
By default, MSYS grep reads in text-mode and converts CRLF into LF line endings. For testing HTTP use binary mode (-U) as checking is done for CR in HTTP headers Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-01Skip t1300.70 and 71 on msysGit.Libravatar Pat Thoyts3-10/+6
These two tests fail on msysGit because /dev/null is an alias for nul on Windows and when reading the value back from git config the alias does not match the real filename. Also the HOME environment variable has a unix-style path but git returns a native equivalent path for '~'. As these are platform-dependent equivalent results it seems simplest to skip the test entirely. Moves the NOT_MINGW prereq from t5503 into the test library. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-09-30Merge branch 'maint'Libravatar Junio C Hamano1-38/+14
* maint: Fix typo in pack-objects' usage Make sure that git_getpass() never returns NULL t0004 (unwritable files): simplify error handling rev-list-options: clarify --parents and --children
2010-09-30send-email: use Perl idioms in while loopLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change `while(<$fh>) { my $c = $_' to `while(my $c = <$fh>) {', and use `chomp $c' instead of `$c =~ s/\n$//g;', the two are equivalent in this case. I've also changed the --cccmd test so that we test for the stripping of whitespace at the beginning of the lines returned from the --cccmd. I think we probably shouldn't do this, but it was there already so I haven't changed the behavior. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-30gitweb/Makefile: Add 'test' and 'test-installed' targetsLibravatar Jakub Narebski1-0/+4
The 'test-installed' target in gitweb/Makefile tests installed gitweb, using the same destination directory that 'install' target uses. The 'test' target is just a convenience wrapper invoking 'gitweb-test' target of t/Makefile. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-30t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLEDLibravatar Jakub Narebski1-2/+19
You can set the GITWEB_TEST_INSTALLED environment variable to the gitwebdir (the directory where gitweb is installed / deployed to) of an existing gitweb instalation, or to the pathname of installed gitweb script, to test that installation. This change is intended to make it possible to test that process of installing gitweb and the modules it depends on works correctly (after splitting gitweb). If GITWEB_TEST_INSTALLED is used, print what script are we testing to make it easy to spot that we test installed gitweb. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-30t0004 (unwritable files): simplify error handlingLibravatar Jonathan Nieder1-38/+14
Instead of ... normal test script ... status=$? ... cleanup ... (exit $status) set up cleanup commands with test_when_finished. This makes the test script a little shorter, and more importantly, it ensures errors during cleanup are reported. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-29blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''Libravatar Kirill Smelkov2-8/+4
We need to get the correct mode when blame reads the source from the working tree, the index, or trees. This allows us to omit running textconv filters on symbolic links. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-29blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinksLibravatar Kirill Smelkov2-0/+78
git blame --textconv is wrongly calling the textconv filter on symlinks: symlinks are stored as blobs whose content is the target of the link, and blame calls the textconv filter on a temporary file filled-in with the content of this blob. For example: $ git blame -C -C regular-file.pdf Error: May not be a PDF file (continuing anyway) Error: PDF file is damaged - attempting to reconstruct xref table... Error: Couldn't find trailer dictionary Error: Couldn't read xref table Warning: program returned non-zero exit code #1 fatal: unable to read files to diff That errors come from pdftotext run on symlink.pdf being extracted to /tmp/ with one-line plain-text content pointing to link destination. So several failures are demonstrated here: - git cat-file --textconv :symlink.bin # also HEAD:symlink.bin - git blame --textconv symlink.bin - git blame -C -C --textconv regular-file # but also looks on symlink.bin At present they all fail with something like. E: /tmp/j3ELEs_symlink.bin is not "binary" file NOTE: git diff doesn't try to textconv the pathnames, it runs the textual diff without textconv, which is the expected behavior. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>