summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-11-25t1200: fix a timing dependent errorLibravatar Nanako Shiraishi1-3/+7
The fourth test of show-branch in t1200 test was failing but only sometimes. It only failed when two commits created in an earlier test had different timestamps. When they were created within the same second, the actual output matched the expected output. Fix this by using test_tick to force reliable timestamps and update the expected output so it does not to depend on the commits made in the same sacond. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Merge branch 'jc/log-stdin'Libravatar Junio C Hamano1-0/+61
* jc/log-stdin: Add trivial tests for --stdin option to log family Make --stdin option to "log" family read also pathspecs setup_revisions(): do not call get_pathspec() too early Teach --stdin option to "log" family read_revision_from_stdin(): use strbuf Conflicts: revision.c
2009-11-23Merge branch 'mr/gitweb-snapshot'Libravatar Junio C Hamano3-1/+169
* mr/gitweb-snapshot: t/gitweb-lib: Split HTTP response with non-GNU sed gitweb: Smarter snapshot names gitweb: Document current snapshot rules via new tests t/gitweb-lib.sh: Split gitweb output into headers and body gitweb: check given hash before trying to create snapshot
2009-11-23t/gitweb-lib: Split HTTP response with non-GNU sedLibravatar Brian Gernhardt1-2/+12
Recognizing \r in a regex is something GNU sed will do, but other sed implementation's won't (e.g. BSD sed on OS X). Instead of two sed invocations, use a single Perl script to split output into headers and body. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Merge branch 'cc/replace'Libravatar Junio C Hamano1-0/+17
* cc/replace: Documentation: talk a little bit about GIT_NO_REPLACE_OBJECTS Documentation: fix typos and spelling in replace documentation replace: use a GIT_NO_REPLACE_OBJECTS env variable
2009-11-23t4014-format-patch: do not assume 'test' is available as non-builtinLibravatar Johannes Sixt1-4/+2
One test case used 'xargs test', which assumes that 'test' is available as external program. At least on MinGW it is not. Moreover, 'git format-patch' was invoked in a pipeline, but not as the last command. Rewrite the test case to catch breakage in 'git format-patch' as well. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Add trivial tests for --stdin option to log familyLibravatar Junio C Hamano1-0/+61
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Merge branch 'bg/fetch-multi'Libravatar Junio C Hamano3-2/+184
* bg/fetch-multi: Re-implement 'git remote update' using 'git fetch' builtin-fetch: add --dry-run option builtin-fetch: add --prune option teach warn_dangling_symref to take a FILE argument remote: refactor some logic into get_stale_heads() Add missing test for 'git remote update --prune' Add the configuration option skipFetchAll Teach the --multiple option to 'git fetch' Teach the --all option to 'git fetch'
2009-11-22Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano1-0/+23
* git://git.bogomips.org/git-svn: git svn: strip leading path when making empty dirs git svn: always reuse existing remotes on fetch
2009-11-22git svn: strip leading path when making empty dirsLibravatar Eric Wong1-0/+23
Since unhandled.log stores paths relative to the repository root, we need to strip out leading path components if the directories we're tracking are not the repository root. Reported-by: Björn Steinbrink Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-11-22Merge branch 'rj/maint-t9700'Libravatar Junio C Hamano1-1/+1
* rj/maint-t9700: t9700-perl-git.sh: Fix a test failure on Cygwin
2009-11-22Merge branch 'ls/maint-mailinfo-no-inbody'Libravatar Junio C Hamano14-1/+101
* ls/maint-mailinfo-no-inbody: git am/mailinfo: Don't look at in-body headers when rebasing
2009-11-22Merge branch 'pb/maint-use-custom-perl'Libravatar Junio C Hamano3-4/+4
* pb/maint-use-custom-perl: Make sure $PERL_PATH is defined when the test suite is run.
2009-11-22Merge branch 'bc/grep-i-F'Libravatar Junio C Hamano1-0/+10
* bc/grep-i-F: grep: Allow case insensitive search of fixed-strings
2009-11-22strbuf_add_wrapped_text(): factor out strbuf_add_indented_text()Libravatar René Scharfe1-0/+21
Add a new helper function, strbuf_add_indented_text(), to indent text without a width limit, and call it from strbuf_add_wrapped_text(). It respects both indent (applied to the first line) and indent2 (applied to the rest of the lines); indent2 was ignored by the indent-only path of strbuf_add_wrapped_text() before the patch. Two simple test cases are added, one exercising strbuf_add_wrapped_text() and the other strbuf_add_indented_text(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-22grep: unset GREP_OPTIONS before spawning external grepLibravatar René Scharfe1-0/+5
While we're at it, also unset GREP_COLOR and GREP_COLORS in case colouring is not enabled, to be on the safe side. The presence of these variables alone is not sufficient to trigger coloured output with GNU grep, but other implementations may behave differently. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-20Merge branch 'jh/notes' (early part)Libravatar Junio C Hamano4-0/+622
* 'jh/notes' (early part): Add selftests verifying concatenation of multiple notes for the same commit Refactor notes code to concatenate multiple notes annotating the same object Add selftests verifying that we can parse notes trees with various fanouts Teach the notes lookup code to parse notes trees with various fanout schemes Teach notes code to free its internal data structures on request Add '%N'-format for pretty-printing commit notes Add flags to get_commit_notes() to control the format of the note string t3302-notes-index-expensive: Speed up create_repo() fast-import: Add support for importing commit notes Teach "-m <msg>" and "-F <file>" to "git notes edit" Add an expensive test for git-notes Speed up git notes lookup Add a script to edit/inspect notes Introduce commit notes Conflicts: .gitignore Documentation/pretty-formats.txt pretty.c
2009-11-20Merge branch 'sp/smart-http'Libravatar Junio C Hamano6-21/+507
* sp/smart-http: (37 commits) http-backend: Let gcc check the format of more printf-type functions. http-backend: Fix access beyond end of string. http-backend: Fix bad treatment of uintmax_t in Content-Length t5551-http-fetch: Work around broken Accept header in libcurl t5551-http-fetch: Work around some libcurl versions http-backend: Protect GIT_PROJECT_ROOT from /../ requests Git-aware CGI to provide dumb HTTP transport http-backend: Test configuration options http-backend: Use http.getanyfile to disable dumb HTTP serving test smart http fetch and push http tests: use /dumb/ URL prefix set httpd port before sourcing lib-httpd t5540-http-push: remove redundant fetches Smart HTTP fetch: gzip requests Smart fetch over HTTP: client side Smart push over HTTP: client side Discover refs via smart HTTP server when available http-backend: more explict LocationMatch http-backend: add example for gitweb on same URL http-backend: use mod_alias instead of mod_rewrite ... Conflicts: .gitignore remote-curl.c
2009-11-20Merge branch 'jn/editor-pager'Libravatar Junio C Hamano3-20/+43
* jn/editor-pager: Provide a build time default-pager setting Provide a build time default-editor setting am -i, git-svn: use "git var GIT_PAGER" add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR" Teach git var about GIT_PAGER Teach git var about GIT_EDITOR Suppress warnings from "git var -l" Do not use VISUAL editor on dumb terminals Handle more shell metacharacters in editor names
2009-11-20Merge branch 'bg/format-patch-doc-update'Libravatar Junio C Hamano1-0/+18
* bg/format-patch-doc-update: format-patch: Add "--no-stat" as a synonym for "-p" format-patch documentation: Fix formatting format-patch documentation: Remove diff options that are not useful format-patch: Always generate a patch
2009-11-20Merge branch 'tr/filter-branch'Libravatar Junio C Hamano1-0/+18
* tr/filter-branch: filter-branch: nearest-ancestor rewriting outside subdir filter filter-branch: stop special-casing $filter_subdir argument
2009-11-20Merge branch 'jl/submodule-add-noname'Libravatar Junio C Hamano1-0/+16
* jl/submodule-add-noname: git submodule add: make the <path> parameter optional
2009-11-20Merge branch 'sb/ls-tree-parseopt'Libravatar Junio C Hamano1-2/+87
* sb/ls-tree-parseopt: ls-tree: migrate to parse-options t3101: test more ls-tree options
2009-11-20Merge branch 'jp/fetch-cull-many-refs'Libravatar Junio C Hamano1-0/+11
* jp/fetch-cull-many-refs: remote: fix use-after-free error detected by glibc in ref_remove_duplicates fetch: Speed up fetch of large numbers of refs remote: Make ref_remove_duplicates faster for large numbers of refs
2009-11-20git am/mailinfo: Don't look at in-body headers when rebasingLibravatar Lukas Sandström14-1/+101
When we are rebasing we know that the header lines in the patch are good and that we don't need to pick up any headers from the body of the patch. This makes it possible to rebase commits whose commit message start with "From" or "Date". Test vectors by Jeff King. Signed-off-by: Lukas Sandström <luksan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-20replace: use a GIT_NO_REPLACE_OBJECTS env variableLibravatar Christian Couder1-0/+17
This has the same effect as --no-replace-objects option; git ignores the replace refs. When --no-replace-objects option is passed to git, this environment variable is set to "1" and exported to subprocesses in order to propagate the same setting. It is useful for example for scripts, as the git commands used in them can now be aware that they must not read replace refs. Tested-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-20describe: do not use unannotated tag even if exact matchLibravatar Thomas Rast1-0/+6
4d23660 (describe: when failing, tell the user about options that work, 2009-10-28) forgot to update the shortcut path where the code detected and used a possible exact match. This means that an unannotated tag on HEAD would be used by 'git describe'. Guard this code path against the new circumstances, where unannotated tags can be present in ->util even if we're not actually planning to use them. While there, also add some tests for --all. Reported by 'yashi' on IRC. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-19t9700-perl-git.sh: Fix a test failure on CygwinLibravatar Ramsay Jones1-1/+1
The t/t9700/test.pl script uses method invocation syntax when using the Cwd module to determine the current working directory. This fails on cygwin, since cygwin perl specifically checks for any arguments to the cwd() function and croak()'s with the message "Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file perl-5.8.8/cygwin/cygwin.c lines 139-157) In order to avoid the problem, we replace the method invocation syntax with a simple function call. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-17Merge branch 'sb/tutorial-test'Libravatar Junio C Hamano1-61/+159
* sb/tutorial-test: t1200: prepare for merging with Fast-forward bikeshedding t1200: further modernize test script style t1200: Make documentation and test agree t1200: cleanup and modernize test style
2009-11-17Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano6-60/+476
* git://git.bogomips.org/git-svn: Document git-svn's first-parent rule git svn: attempt to create empty dirs on clone+rebase git svn: add authorsfile test case for ~/.gitconfig git svn: read global+system config for clone+init git svn: handle SVN merges from revisions past the tip of the branch
2009-11-17Make sure $PERL_PATH is defined when the test suite is run.Libravatar Philippe Bruhat (BooK)3-4/+4
Some test scripts run Perl scripts as if they were git-* scripts, and thus need to use the same perl that will be put in the shebang line of git*.perl commands. $PERL_PATH therefore needs to be used instead of a bare "perl". The tests can fail if another perl is found in $PATH before the one defined in $PERL_PATH. Example test failure caused by this: the perl defined in $PERL_PATH has Error.pm installed, and therefore the Git.pm's Makefile.PL doesn't install the private copy. The perl from $PATH doesn't have Error.pm installed, and all git*.perl scripts invoked during the test will fail loading Error.pm. Makefile patch by Jeff King <peff@peff.net>. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-16t3101: test more ls-tree optionsLibravatar Stephen Boyd1-2/+87
Add tests for --full-name, --full-tree, --abbrev, and --name-only. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-16grep: Allow case insensitive search of fixed-stringsLibravatar Brian Collins1-0/+10
"git grep" currently an error when you combine the -F and -i flags. This isn't in line with how GNU grep handles it. This patch allows the simultaneous use of those flags. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Brian Collins <bricollins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-15git svn: attempt to create empty dirs on clone+rebaseLibravatar Eric Wong2-2/+87
We parse unhandled.log files for empty_dir statements and make a best effort attempt to recreate empty directories on fresh clones and rebase. This should cover the majority of cases where users work off a single branch or for projects where branches do not differ in empty directories. Since this cannot affect "normal" git commands like "checkout" or "reset", so users switching between branches in a single working directory should use the new "git svn mkdirs" command after switching branches. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-11-15Merge branch 'js/maint-diff-color-words'Libravatar Junio C Hamano1-0/+20
* js/maint-diff-color-words: diff --color-words: bit of clean-up diff --color-words -U0: fix the location of hunk headers t4034-diff-words: add a test for word diff without context Conflicts: diff.c
2009-11-15Merge branch 'fc/doc-fast-forward'Libravatar Junio C Hamano4-6/+6
* fc/doc-fast-forward: Use 'fast-forward' all over the place Conflicts: builtin-merge.c
2009-11-15Merge branch 'jk/maint-add-p-empty'Libravatar Junio C Hamano1-0/+17
* jk/maint-add-p-empty: add-interactive: handle deletion of empty files
2009-11-14remote: fix use-after-free error detected by glibc in ref_remove_duplicatesLibravatar Julian Phillips1-0/+11
In ref_remove_duplicates, when we encounter a duplicate and remove it from the list we need to make sure that the prev pointer stays pointing at the last entry and also skip over adding the just freed entry to the string_list. Previously fetch could crash with: *** glibc detected *** git: corrupted double-linked list: ... Also add a test to try and catch problems with duplicate removal in the future. Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-14git svn: add authorsfile test case for ~/.gitconfigLibravatar Eric Wong1-0/+23
The commit for: git svn: read global+system config for clone+init Initially lacked a test case because the author was unable to reproduce it under his test environment, this adds it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-11-14git svn: handle SVN merges from revisions past the tip of the branchLibravatar Toby Allsopp3-58/+366
When recording the revisions that it has merged, SVN sets the top revision to be the latest revision in the repository, which is not necessarily a revision on the branch that is being merged from. When it is not on the branch, git-svn fails to add the extra parent to represent the merge because it relies on finding the commit on the branch that corresponds to the top of the SVN merge range. In order to correctly handle this case, we look for the maximum revision less than or equal to the top of the SVN merge range that is actually on the branch being merged from. [ew: This includes the following (squashed) commit to prevent errors during bisect:] Author: Toby Allsopp <toby.allsopp@navman.co.nz> Date: Fri Nov 13 09:48:39 2009 +1300 git-svn: add (failing) test for SVN 1.5+ merge with intervening commit This test exposes a bug in git-svn's handling of SVN 1.5+ mergeinfo properties. The problematic case is when there is some commit on an unrelated branch after the last commit on the merged-from branch. When SVN records the mergeinfo property, it records the latest revision in the whole repository, which, in the problematic case, is not on the branch it is merging from. To trigger the git-svn bug, we modify t9151 to include two SVN merges, the second of which has an intervening commit. The SVN dump was generated using SVN 1.6.6 (on Debian squeeze amd64). Signed-off-by: Toby Allsopp <toby.allsopp@navman.co.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-11-13Provide a build time default-editor settingLibravatar Jonathan Nieder1-12/+25
Provide a DEFAULT_EDITOR knob to allow setting the fallback editor to use instead of vi (when VISUAL, EDITOR, and GIT_EDITOR are unset). The value can be set at build time according to a system’s policy. For example, on Debian systems, the default editor should be the 'editor' command. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-13Do not use VISUAL editor on dumb terminalsLibravatar Jonathan Nieder3-8/+18
Refuse to use $VISUAL and fall back to $EDITOR if TERM is unset or set to "dumb". Traditionally, VISUAL is set to a screen editor and EDITOR to a line-based editor, which should be more useful in that situation. vim, for example, is happy to assume a terminal supports ANSI sequences even if TERM is dumb (e.g., when running from a text editor like Acme). git already refuses to fall back to vi on a dumb terminal if GIT_EDITOR, core.editor, VISUAL, and EDITOR are unset, but without this patch, that check is suppressed by VISUAL=vi. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-13filter-branch: nearest-ancestor rewriting outside subdir filterLibravatar Thomas Rast1-0/+18
Since a0e4639 (filter-branch: fix ref rewriting with --subdirectory-filter, 2008-08-12) git-filter-branch has done nearest-ancestor rewriting when using a --subdirectory-filter. However, that rewriting strategy is also a useful building block in other tasks. For example, if you want to split out a subset of files from your history, you would typically call git filter-branch -- <refs> -- <files> But this fails for all refs that do not point directly to a commit that affects <files>, because their referenced commit will not be rewritten and the ref remains untouched. The code was already there for the --subdirectory-filter case, so just introduce an option that enables it independently. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Merge branch 'jk/maint-format-patch-p-suppress-stat'Libravatar Junio C Hamano1-0/+21
* jk/maint-format-patch-p-suppress-stat: format-patch: make "-p" suppress diffstat
2009-11-10Merge branch 'jk/maint-1.6.3-ls-files-i'Libravatar Junio C Hamano1-0/+8
* jk/maint-1.6.3-ls-files-i: ls-files: unbreak "ls-files -i"
2009-11-10Merge branch 'bg/merge-ff-only'Libravatar Junio C Hamano1-0/+41
* bg/merge-ff-only: Teach 'git merge' and 'git pull' the option --ff-only
2009-11-10Merge branch 'jp/dirty-describe'Libravatar Junio C Hamano1-0/+14
* jp/dirty-describe: Teach "git describe" --dirty option
2009-11-10format-patch: Always generate a patchLibravatar Björn Gustavsson1-0/+18
Jeff King recently reinstated -p to suppress the default diffstat (as -p used to work before 68daa64, about 14 months ago). However, -p is also needed in combination with certain options (e.g. --stat or --numstat) in order to produce any patch at all. The documentation does not mention this. Since the purpose of format-patch is to produce a patch that can be emailed, it does not make sense that certain combination of options will suppress the generation of the patch itself. Therefore: * Update 'git format-patch' to always generate a patch. * Since the --name-only, --name-status, and --check suppresses the generation of the patch, disallow those options, and remove the description of them in the documentation. * Remove the reference to -p in the description of -U. * Remove the descriptions of the options that are synonyms for -p plus another option (--patch-with-raw and --patch-with-stat). * While at it, slightly tweak the description of -p itself to say that it generates "plain patches", so that you can think of -p as "plain patch" as an mnemonic aid. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Add missing test for 'git remote update --prune'Libravatar Björn Gustavsson1-0/+11
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Add the configuration option skipFetchAllLibravatar Björn Gustavsson1-3/+37
Implement the configuration skipFetchAll option to allow certain remotes to be skipped when doing 'git fetch --all' and 'git remote update'. The existing skipDefaultUpdate variable is still honored (by 'git fetch --all' and 'git remote update'). (If both are set in the configuration file with different values, the value of the last occurrence will be used.) Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>