summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-07-19Merge branch 'jc/index-pack'Libravatar Junio C Hamano1-3/+20
* jc/index-pack: verify-pack: use index-pack --verify index-pack: show histogram when emulating "verify-pack -v" index-pack: start learning to emulate "verify-pack -v" index-pack: a miniscule refactor index-pack --verify: read anomalous offsets from v2 idx file write_idx_file: need_large_offset() helper function index-pack: --verify write_idx_file: introduce a struct to hold idx customization options index-pack: group the delta-base array entries also by type Conflicts: builtin/verify-pack.c cache.h sha1_file.c
2011-07-19Merge branch 'jc/submodule-sync-no-auto-vivify'Libravatar Junio C Hamano1-2/+13
* jc/submodule-sync-no-auto-vivify: submodule add: always initialize .git/config entry submodule sync: do not auto-vivify uninteresting submodule Conflicts: git-submodule.sh
2011-07-19Merge branch 'jk/archive-tar-filter'Libravatar Junio C Hamano1-0/+100
* jk/archive-tar-filter: upload-archive: allow user to turn off filters archive: provide builtin .tar.gz filter archive: implement configurable tar filters archive: refactor file extension format-guessing archive: move file extension format-guessing lower archive: pass archiver struct to write_archive callback archive: refactor list of archive formats archive-tar: don't reload default config options archive: reorder option parsing and config reading
2011-07-19Merge branch 'jk/clone-cmdline-config'Libravatar Junio C Hamano2-0/+57
* jk/clone-cmdline-config: clone: accept config options on the command line config: make git_config_parse_parameter a public function remote: use new OPT_STRING_LIST parse-options: add OPT_STRING_LIST helper
2011-07-19Merge branch 'jk/maint-config-param'Libravatar Junio C Hamano1-0/+18
* jk/maint-config-param: config: use strbuf_split_str instead of a temporary strbuf strbuf: allow strbuf_split to work on non-strbufs config: avoid segfault when parsing command-line config config: die on error in command-line config fix "git -c" parsing of values with equals signs strbuf_split: add a max parameter
2011-07-19Merge branch 'jk/tag-list-multiple-patterns'Libravatar Junio C Hamano1-0/+5
* jk/tag-list-multiple-patterns: tag: accept multiple patterns for --list
2011-07-13Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4'Libravatar Junio C Hamano1-0/+18
* bc/submodule-foreach-stdin-fix-1.7.4: git-submodule.sh: preserve stdin for the command spawned by foreach t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin Conflicts: git-submodule.sh
2011-07-13Merge branch 'jl/maint-fetch-recursive-fix'Libravatar Junio C Hamano1-8/+8
* jl/maint-fetch-recursive-fix: fetch: Also fetch submodules in subdirectories in on-demand mode
2011-07-13Merge branch 'aw/rebase-i-p'Libravatar Junio C Hamano3-3/+29
* aw/rebase-i-p: rebase -i -p: include non-first-parent commits in todo list
2011-07-13Merge branch 'jc/no-gitweb-test-without-cgi-etc'Libravatar Junio C Hamano1-0/+5
* jc/no-gitweb-test-without-cgi-etc: t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met
2011-07-13Merge branch 'fg/submodule-keep-updating'Libravatar Junio C Hamano1-0/+144
* fg/submodule-keep-updating: git-submodule.sh: clarify the "should we die now" logic submodule update: continue when a checkout fails git-sh-setup: add die_with_status Conflicts: git-submodule.sh
2011-06-29git-submodule.sh: preserve stdin for the command spawned by foreachLibravatar Brandon Casey1-2/+2
The user-supplied command spawned by 'submodule foreach' loses its connection to the original standard input. Instead, it is connected to the output of a pipe within the git-submodule script. The user-supplied command supplied to 'submodule foreach' is spawned within a while loop which is being piped into. Due to the way shells implement piping output to a while loop, a subshell is created with its standard input attached to the output of the pipe. This results in all of the commands executed within the while loop to have their stdins modified in the same way, including the user-supplied command. This can cause a problem if the command requires reading from stdin or if it changes its behavior based on whether stdin is a tty or not. For example, this problem was noticed when trying to execute the following: git submodule foreach git shortlog --since=two.weeks.ago which printed a message about entering the first submodule and produced no further output and exited with a status of zero. In this case, shortlog detected that it was not connected to a tty, and since no revision was supplied as an argument, it attempted to read the list of revisions from standard input. Instead, it slurped up the list of submodules that was being piped to the enclosing while loop and caused that loop to end early without processing the remaining submodules. Work around this behavior by saving the original standard input file descriptor before the while loop, and restoring it when spawning the user-supplied command. This fixes the tests in t7407. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29t/t7407: demonstrate that the command called by 'submodule foreach' loses stdinLibravatar Brandon Casey1-0/+18
The user-supplied command spawned by 'submodule foreach' loses its connection to the original standard input. Instead, it is connected to the output of a pipe within the git-submodule script. This can cause a problem if the command requires reading from stdin or if it changes its behavior based on whether stdin is a tty or not (e.g. git shortlog). Demonstrate this flaw. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29Merge branch 'jc/streaming-filter' into nextLibravatar Junio C Hamano1-17/+34
* jc/streaming-filter: t0021: test application of both crlf and ident t0021-conversion.sh: fix NoTerminatingSymbolAtEOF test streaming: filter cascading streaming filter: ident filter Add LF-to-CRLF streaming conversion stream filter: add "no more input" to the filters Add streaming filter API convert.h: move declarations for conversion from cache.h
2011-06-29Merge branch 'da/git-prefix-everywhere' into nextLibravatar Junio C Hamano2-0/+49
* da/git-prefix-everywhere: t/t7503-pre-commit-hook.sh: Add GIT_PREFIX tests git-mergetool--lib: Make vimdiff retain the current directory git: Remove handling for GIT_PREFIX setup: Provide GIT_PREFIX to built-ins
2011-06-29Merge branch 'ab/i18n-scripts' into nextLibravatar Junio C Hamano6-14/+15
* ab/i18n-scripts: (48 commits) i18n: git-bisect bisect_next_check "You need to" message i18n: git-bisect [Y/n] messages i18n: git-bisect bisect_replay + $1 messages i18n: git-bisect bisect_reset + $1 messages i18n: git-bisect bisect_run + $@ messages i18n: git-bisect die + eval_gettext messages i18n: git-bisect die + gettext messages i18n: git-bisect echo + eval_gettext message i18n: git-bisect echo + gettext messages i18n: git-bisect gettext + echo message i18n: git-bisect add git-sh-i18n i18n: git-stash drop_stash say/die messages i18n: git-stash "unknown option" message i18n: git-stash die + eval_gettext $1 messages i18n: git-stash die + eval_gettext $* messages i18n: git-stash die + eval_gettext messages i18n: git-stash die + gettext messages i18n: git-stash say + gettext messages i18n: git-stash echo + gettext message i18n: git-stash add git-sh-i18n ...
2011-06-29Merge branch 'rs/grep-color'Libravatar Junio C Hamano1-0/+95
* rs/grep-color: grep: add --heading grep: add --break grep: fix coloring of hunk marks between files
2011-06-29Merge branch 'jc/maint-1.7.3-checkout-describe'Libravatar Junio C Hamano1-0/+11
* jc/maint-1.7.3-checkout-describe: checkout -b <name>: correctly detect existing branch
2011-06-29Merge branch 'jk/maint-1.7.2-status-ignored'Libravatar Junio C Hamano1-0/+121
* jk/maint-1.7.2-status-ignored: git status --ignored: tests and docs status: fix bug with missing --ignore files Conflicts: Documentation/git-status.txt t/t7508-status.sh
2011-06-29Merge branch 'mg/diff-stat-count'Libravatar Junio C Hamano1-0/+25
* mg/diff-stat-count: diff --stat-count: finishing touches diff-options.txt: describe --stat-{width,name-width,count} diff: introduce --stat-lines to limit the stat lines diff.c: omit hidden entries from namelen calculation with --stat
2011-06-29Merge branch 'jk/combine-diff-binary-etc'Libravatar Junio C Hamano1-0/+212
* jk/combine-diff-binary-etc: combine-diff: respect textconv attributes refactor get_textconv to not require diff_filespec combine-diff: handle binary files as binary combine-diff: calculate mode_differs earlier combine-diff: split header printing into its own function
2011-06-29Merge git://bogomips.org/git-svn into maintLibravatar Junio C Hamano1-0/+33
* git://bogomips.org/git-svn: git-svn: Correctly handle root commits in mergeinfo ranges git-svn: Disambiguate rev-list arguments to improve error message git-svn: Demonstrate a bug with root commits in mergeinfo ranges
2011-06-29Merge branch 'maint-1.7.5' into maintLibravatar Junio C Hamano1-2/+10
* maint-1.7.5: test: skip clean-up when running under --immediate mode "branch -d" can remove more than one branches
2011-06-29test: skip clean-up when running under --immediate modeLibravatar Junio C Hamano1-2/+10
Some tests try to be too careful about cleaning themselves up and do test_expect_success description ' set-up some test refs and/or configuration && test_when_finished "revert the above changes" && the real test ' Which is nice to make sure that a potential failure would not have unexpected interaction with the next test. This however interferes when "the real test" fails and we want to see what is going on, by running the test with --immediate mode and descending into its trash directory after the test stops. The precondition to run the real test and cause it to fail is all gone after the clean-up procedure defined by test_when_finished is done. Update test_run_ which is the workhorse of running a test script called from test_expect_success and test_expect_failure, so that we do not run clean-up script defined with test_when_finished when a test that is expected to succeed fails under the --immediate mode. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Jeff King <peff@peff.net>
2011-06-28git-svn: Correctly handle root commits in mergeinfo rangesLibravatar Michael Haggerty1-1/+1
If the bottom of a mergeinfo range is a commit that maps to a git root commit, then it doesn't have a parent. In such a case, use git commit range "$top_commit" rather than "$bottom_commit^..$top_commit". [ew: line-wrap at 80 columns] Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-06-28git-svn: Demonstrate a bug with root commits in mergeinfo rangesLibravatar Michael Haggerty1-0/+33
If a svn:mergeinfo range starts at a commit that was converted as a git root commit (e.g., r1 or a branch that was created out of thin air), then there is an error when git-svn tries to run git rev-list "$bottom_commit^..$top_commit" because $bottom_commit (the git commit corresponding to r1) has no parent. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-06-26submodule sync: do not auto-vivify uninteresting submoduleLibravatar Junio C Hamano1-2/+13
Earlier 33f072f (submodule sync: Update "submodule.<name>.url" for empty directories, 2010-10-08) attempted to fix a bug where "git submodule sync" command does not update the URL if the current superproject does not have a checkout of the submodule. However, it did so by unconditionally registering submodule.$name.url to every submodule in the project, even the ones that the user has never showed interest in at all by running 'git submodule init' command. This caused subsequent 'git submodule update' to start cloning/updating submodules that are not interesting to the user at all. Update the code so that the URL is updated from the .gitmodules file only for submodules that already have submodule.$name.url entries, i.e. the ones the user has showed interested in having a checkout. Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22clone: accept config options on the command lineLibravatar Jeff King1-0/+40
Clone does all of init, "remote add", fetch, and checkout without giving the user a chance to intervene and set any configuration. This patch allows you to set config options in the newly created repository after the clone, but before we do any other operations. In many cases, this is a minor convenience over something like: git clone git://... git config core.whatever true But in some cases, it can bring extra efficiency by changing how the fetch or checkout work. For example, setting line-ending config before the checkout avoids having to re-checkout all of the contents with the correct line endings. It also provides a mechanism for passing information to remote helpers during a clone; the helpers may read the git config to influence how they operate. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22parse-options: add OPT_STRING_LIST helperLibravatar Jeff King1-0/+17
This just adds repeated invocations of an option to a list of strings. Using the "--no-<var>" form will reset the list to empty. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22config: avoid segfault when parsing command-line configLibravatar Jeff King1-0/+4
We already check for an empty key on the left side of an equals, but we would segfault if there was no content at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22config: die on error in command-line configLibravatar Jeff King1-0/+8
The error handling for git_config is somewhat confusing. We collect errors from running git_config_from_file on the various config files and carefully pass them back up. But the two odd things are: 1. We actually die on most errors in git_config_from_file. In fact, the only error we actually pass back up is if fopen() fails on the file. 2. Most callers of git_config do not check the error return at all, but will continue if git_config reports an error. When the code for "git -c core.foo=bar" was added, it dutifully passed errors up the call stack, only for them to be eventually ignored. This makes it inconsistent with the file-parsing code, which will die when it sees malformed config. And it's somewhat unsafe, because it means an error in parsing a typo like: git -c clean.requireforce=ture clean will continue the command, ignoring the config the user tried to give. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22fix "git -c" parsing of values with equals signsLibravatar Jeff King1-0/+6
If you do something like: git -c core.foo="value with = in it" ... we would split your option on "=" into three fields and throw away the third one. With this patch we correctly take everything after the first "=" as the value (keys cannot have an equals sign in them, so the parsing is unambiguous). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22upload-archive: allow user to turn off filtersLibravatar Jeff King1-3/+22
Some tar filters may be very expensive to run, so sites do not want to expose them via upload-archive. This patch lets users configure tar.<filter>.remote to turn them off. By default, gzip filters are left on, as they are about as expensive as creating zip archives. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22archive: provide builtin .tar.gz filterLibravatar Jeff King1-0/+38
This works exactly as if the user had configured it via: [tar "tgz"] command = gzip -cn [tar "tar.gz"] command = gzip -cn but since it is so common, it's convenient to have it builtin without the user needing to do anything. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22archive: implement configurable tar filtersLibravatar Jeff King1-0/+43
It's common to pipe the tar output produce by "git archive" through gzip or some other compressor. Locally, this can easily be done by using a shell pipe. When requesting a remote archive, though, it cannot be done through the upload-archive interface. This patch allows configurable tar filters, so that one could define a "tar.gz" format that automatically pipes tar output through gzip. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20Merge branch 'mk/grep-pcre'Libravatar Junio C Hamano1-3/+3
* mk/grep-pcre: t7810: avoid unportable use of "echo"
2011-06-20t7810: avoid unportable use of "echo"Libravatar Junio C Hamano1-3/+3
Michael J Gruber noticed that under /bin/dash this test failed (as is expected -- \n in the string can be interpreted by the command), while it passed with bash. We probably could work it around by using backquote in front of it, but it is safer and more readable to avoid "echo" altogether in a case like this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20fetch: Also fetch submodules in subdirectories in on-demand modeLibravatar Jens Lehmann1-8/+8
When on-demand mode was active examining the new commits just fetched in the superproject (to check if they record commits for submodules which are not downloaded yet) wasn't done recursively. Because of that fetch did not recursively fetch submodules living in subdirectories even when it should have. Fix that by adding the RECURSIVE flag to the diff_options used to check the new commits and avoid future regressions in this area by moving a submodule in t5526 into a subdirectory. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20tag: accept multiple patterns for --listLibravatar Jeff King1-0/+5
Until now, "git tag -l foo* bar*" would silently ignore the second argument, showing only refs starting with "foo". It's not just unfriendly not to take a second pattern; we actually generated subtly wrong results (from the user's perspective) because some of the requested tags were omitted. This patch allows an arbitrary number of patterns on the command line; if any of them matches, the ref is shown. While we're tweaking the documentation, let's also make it clear that the pattern is fnmatch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-19Merge branch 'di/no-no-existant'Libravatar Junio C Hamano6-13/+13
* di/no-no-existant: Fix typo: existant->existent
2011-06-19rebase -i -p: include non-first-parent commits in todo listLibravatar Andrew Wong3-3/+29
Consider this graph: D---E (topic, HEAD) / / A---B---C (master) \ F (topic2) and the following three commands: 1. git rebase -i -p A 2. git rebase -i -p --onto F A 3. git rebase -i -p B Currently, (1) and (2) will pick B, D, C, and E onto A and F, respectively. However, (3) will only pick D and E onto B, but not C, which is inconsistent with (1) and (2). As a result, we cannot modify C during the interactive-rebase. The current behavior also creates a bug if we do: 4. git rebase -i -p C In (4), E is never picked. And since interactive-rebase resets "HEAD" to "onto" before picking any commits, D and E are lost after the interactive-rebase. This patch fixes the inconsistency and bug by ensuring that all children of upstream are always picked. This essentially reverts the commit: d80d6bc146232d81f1bb4bc58e5d89263fd228d4 When compiling the todo list, commits reachable from "upstream" should never be skipped under any conditions. Otherwise, we lose the ability to modify them like (3), and create a bug like (4). Two of the tests contain a scenario like (3). Since the new behavior added more commits for picking, these tests need to be updated to account for the additional pick lines. A new test has also been added for (4). Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-17tests: link shell libraries into valgrind directoryLibravatar Jeff King1-2/+7
When we run tests under valgrind, we symlink anything executable that starts with git-* or test-* into a special valgrind bin directory, and then make that our GIT_EXEC_PATH. However, shell libraries like git-sh-setup do not have the executable bit marked, and did not get symlinked. This means that any test looking for shell libraries in our exec-path would fail to find them, even though that is a fine thing to do when testing against a regular git build (or in a git install, for that matter). t2300 demonstrated this problem. The fix is to symlink these shell libraries directly into the valgrind directory. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-17t/Makefile: pass test opts to valgrind target properlyLibravatar Jeff King1-1/+1
The valgrind target just reinvokes make with GIT_TEST_OPTS set to "--valgrind". However, it does this using an environment variable, which means GIT_TEST_OPTS in your config.mak would override it, and "make valgrind" would simply run the test suite without valgrind on. Instead, we should pass GIT_TEST_OPTS on the command-line, overriding what's in config.mak, and take care to append to whatever the user has there already. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-16Fix typo: existant->existentLibravatar Dmitry Ivankov6-13/+13
refs.c had a error message "Trying to write ref with nonexistant object". And no tests relied on the wrong spelling. Also typo was present in some test scripts internals, these tests still pass. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-15t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not metLibravatar Junio C Hamano1-0/+5
Linus noticed that we go ahead testing gitweb and fail miserably on a box with Perl but not perl-CGI library. We already have a code to detect lack of Perl and refrain from testing gitweb in t/gitweb-lib.sh (by the way, shouldn't it be called t/lib-gitweb.sh?), so let's extend it to cover this case as well. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-13submodule update: continue when a checkout failsLibravatar Fredrik Gustafsson1-0/+144
"git submodule update" stops at the first error and gives control back to the user. Only after the user fixes the problematic submodule and runs "git submodule update" again, the second error is found. And the user needs to repeat until all the problems are found and fixed one by one. This is tedious. Instead, the command can remember which submodules it had trouble with, continue updating the ones it can, and report which ones had errors at the end. The user can run "git submodule update", find all the ones that need minor fixing (e.g. working tree was dirty) to fix them in a single pass. Then another "git submodule update" can be run to update all. Note that the problematic submodules are skipped only when they are to be integrated with a safer value of submodule.<name>.update option, namely "checkout". Fixing a failure in a submodule that uses "rebase" or "merge" may need an involved conflict resolution by the user, and leaving too many submodules in states that need resolution would not reduce the mental burden on the user. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-09gitweb: do not misparse nonnumeric content tag files that contain a digitLibravatar Jonathan Nieder1-0/+8
v1.7.6-rc0~27^2~4 (gitweb: Change the way "content tags" ('ctags') are handled, 2011-04-29) tried to make gitweb's tag cloud feature more intuitive for webmasters by checking whether the ctags/<label> under a project's .git dir contains a number (representing the strength of association to <label>) before treating it as one. With that change, after putting '$feature{'ctags'}{'default'} = [1];' in your $GITWEB_CONFIG, you could do echo Linux >.git/ctags/linux and gitweb would treat that as a request to tag the current repository with the Linux tag, instead of the previous behavior of writing an error page embedded in the projects list that triggers error messages from Chromium and Firefox about malformed XML. Unfortunately the pattern (\d+) used to match numbers is too loose, and the "XML declaration allowed only at the start of the document" error can still be experienced if you write "Linux-2.6" in place of "Linux" in the example above. Fix it by tightening the pattern to ^\d+$. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-07Merge branch 'jc/magic-pathspec'Libravatar Junio C Hamano1-6/+6
* jc/magic-pathspec: t3703: skip more tests using colons in file names on Windows
2011-06-07t3703: skip more tests using colons in file names on WindowsLibravatar Alex Riesen1-6/+6
Use the same test and prerequisite as introduced in similar fix in 650af7ae8bdf92bd92df2. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-06Merge branch 'jk/diff-not-so-quick'Libravatar Junio C Hamano1-0/+5
* jk/diff-not-so-quick: diff: futureproof "stop feeding the backend early" logic diff_tree: disable QUICK optimization with diff filter Conflicts: diff.c