summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-05-27rebase: write a reflog entry when finishingLibravatar Jeff King1-1/+1
When we finish a rebase, our detached HEAD is at the final result. We update the original branch ref with this result, and then point the HEAD symbolic ref at the updated branch. We write a reflog for the branch update, but not for the update of HEAD. Because we're already at the final result on the detached HEAD, moving to the branch actually doesn't change our commit sha1 at all. So in that sense, a reflog entry would be pointless. However, humans do read reflogs, and an entry saying "rebase finished: returning to refs/heads/master" can be helpful in understanding what is going on. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26Merge branch 'jn/userdiff-perl-updates'Libravatar Junio C Hamano2-34/+134
* jn/userdiff-perl-updates: userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimiters tests: make test_expect_code quieter on success userdiff/perl: catch sub with brace on second line userdiff/perl: match full line of POD headers userdiff/perl: anchor "sub" and "package" patterns on the left t4018 (funcname patterns): minor cleanups t4018 (funcname patterns): make configuration easier to track t4018 (funcname patterns): make .gitattributes state easier to track
2011-05-26Merge branch 'jn/ctags-more'Libravatar Junio C Hamano1-0/+8
* jn/ctags-more: gitweb: Optional grouping of projects by category gitweb: Modularized git_get_project_description to be more generic gitweb: Split git_project_list_body in two functions
2011-05-26Sync with 1.7.5.3Libravatar Junio C Hamano1-104/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26Merge branch 'jm/maint-diff-words-with-sbe' into maintLibravatar Junio C Hamano1-0/+26
* jm/maint-diff-words-with-sbe: do not read beyond end of malloc'd buffer
2011-05-26Merge branch 'jc/maint-pathspec-stdin-and-cmdline' into maintLibravatar Junio C Hamano1-0/+17
* jc/maint-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly
2011-05-26Merge branch 'jk/cherry-pick-root-with-resolve' into maintLibravatar Junio C Hamano1-2/+25
* jk/cherry-pick-root-with-resolve: t3503: test cherry picking and reverting root commits revert: allow reverting a root commit cherry-pick: handle root commits with external strategies
2011-05-26Merge branch 'jk/git-connection-deadlock-fix' into maintLibravatar Junio C Hamano1-0/+43
* jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c
2011-05-26Merge branch 'svn-fe-maint' of git://repo.or.cz/git/jrn into maintLibravatar Junio C Hamano1-104/+2
* 'svn-fe-maint' of git://repo.or.cz/git/jrn: Revert "t0081 (line-buffer): add buffering tests"
2011-05-25Merge branch 'jc/bigfile'Libravatar Junio C Hamano1-0/+27
* jc/bigfile: Bigfile: teach "git add" to send a large file straight to a pack index_fd(): split into two helper functions index_fd(): turn write_object and format_check arguments into one flag
2011-05-25Merge branch 'js/log-abbrev-commit-config'Libravatar Junio C Hamano1-0/+53
* js/log-abbrev-commit-config: Add log.abbrevCommit config variable "git log -h": typofix misspelled 'suppress'
2011-05-25Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: init/clone: remove short option -L and document --separate-git-dir
2011-05-25init/clone: remove short option -L and document --separate-git-dirLibravatar Nguyen Thai Ngoc Duy1-1/+1
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-23userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimitersLibravatar Jonathan Nieder1-2/+15
A naive method of treating BEGIN/END blocks with a brace on the second line as diff/grep funcname context involves also matching unrelated lines that consist of all-caps letters: sub foo { print <<'EOF' text goes here ... EOF ... rest of foo ... } That's not so great, because it means that "git diff" and "git grep --show-function" would write "=EOF" or "@@ EOF" as context instead of a more useful reminder like "@@ sub foo {". To avoid this, tighten the pattern to only match the special block names that perl accepts (namely BEGIN, END, INIT, CHECK, UNITCHECK, AUTOLOAD, and DESTROY). The list is taken from perl's toke.c. Suggested-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-23Merge branch 'jm/maint-diff-words-with-sbe'Libravatar Junio C Hamano1-0/+26
* jm/maint-diff-words-with-sbe: do not read beyond end of malloc'd buffer
2011-05-23Merge branch 'ms/ls-remote-exit-with-status'Libravatar Junio C Hamano1-0/+24
* ms/ls-remote-exit-with-status: ls-remote: the --exit-code option reports "no matching refs"
2011-05-23Merge branch 'ab/i18n-scripts-basic'Libravatar Junio C Hamano1-0/+51
* ab/i18n-scripts-basic: Makefile: add xgettext target for *.sh files git-sh-i18n.sh: add GIT_GETTEXT_POISON support git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()
2011-05-23Merge branch 'jc/magic-pathspec'Libravatar Junio C Hamano2-0/+94
* jc/magic-pathspec: setup.c: Fix some "symbol not declared" sparse warnings t3703: Skip tests using directory name ":" on Windows revision.c: leave a note for "a lone :" enhancement t3703, t4208: add test cases for magic pathspec rev/path disambiguation: further restrict "misspelled index entry" diag fix overslow :/no-such-string-ever-existed diagnostics fix overstrict :<path> diagnosis grep: use get_pathspec() correctly pathspec: drop "lone : means no pathspec" from get_pathspec() Revert "magic pathspec: add ":(icase)path" to match case insensitively" magic pathspec: add ":(icase)path" to match case insensitively magic pathspec: futureproof shorthand form magic pathspec: add tentative ":/path/from/top/level" pathspec support
2011-05-23Merge branch 'jk/blame-line-porcelain'Libravatar Junio C Hamano1-0/+90
* jk/blame-line-porcelain: blame: add --line-porcelain output format blame: refactor porcelain output add tests for various blame formats
2011-05-21tests: make test_expect_code quieter on successLibravatar Jonathan Nieder1-4/+3
A command exiting with the expected status is not particularly notable. While the indication of progress might be useful when tracking down where in a test a failure has happened, the same applies to most other test helpers, which are quiet about success, so this single helper's output stands out in an unpleasant way. An alternative method for showing progress information might to invent a --progress option that runs tests with "set -x", or until that is available, to run tests using commands like prove -v -j2 --shuffle --exec='sh -x' t2202-add-addremove.sh Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21userdiff/perl: catch sub with brace on second lineLibravatar Jonathan Nieder1-2/+23
Accept sub foo { } as an alternative to a more common style that introduces perl functions with a brace on the first line (and likewise for BEGIN/END blocks). The new regex is a little hairy to avoid matching # forward declaration sub foo; while continuing to match "sub foo($;@) {" and sub foo { # This routine is interesting; # in fact, the lines below explain how... While at it, pay attention to Perl 5.14's "package foo {" syntax as an alternative to the traditional "package foo;". Requested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21userdiff/perl: match full line of POD headersLibravatar Jonathan Nieder1-0/+4
The builtin perl userdiff driver is not greedy enough about catching POD header lines. Capture the whole line, so instead of just declaring that we are in some "@@ =head1" section, diff/grep output can explain that the enclosing section is about "@@ =head1 OPTIONS". Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21userdiff/perl: anchor "sub" and "package" patterns on the leftLibravatar Jonathan Nieder1-3/+56
The userdiff funcname mechanism has no concept of nested scopes --- instead, "git diff" and "git grep --show-function" simply label the diff header with the most recent matching line. Unfortunately that means text following a subroutine in a POD section: =head1 DESCRIPTION You might use this facility like so: sub example { foo; } Now, having said that, let's say more about the facility. Blah blah blah ... etc etc. gets the subroutine name instead of the POD header in its diff/grep funcname header, making it harder to get oriented when reading a diff without enough context. The fix is simple: anchor the funcname syntax to the left margin so nested subroutines and packages like this won't get picked up. (The builtin C++ funcname pattern already does the same thing.) This means the userdiff driver will misparse the idiom { my $static; sub foo { ... use $static ... } } but I think that's worth it; we can revisit this later if the userdiff mechanism learns to keep track of the beginning and end of nested scopes. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21t4018 (funcname patterns): minor cleanupsLibravatar Jonathan Nieder1-24/+25
Introduce a test_expect_funcname function to make a diff and apply a regexp anchored on the left to the function name it writes, avoiding some repetition. Omit the space after >, <<, and < operators for consistency with other scripts. Quote the <<here document delimiter and $ signs in quotes so readers don't have to worry about the effect of shell metacharacters. Remove some unnecessary blank lines. Run "git diff" as a separate command instead of as upstream of a pipe that checks its output, so the exit status can be tested. In particular, this way if "git diff" starts segfaulting the test harness will notice. Allow "error:" as a synonym for "fatal:" when checking error messages, since whether a command uses die() or "return error()" is a small implementation detail. Anchor some more regexes on the right. None of the above is very important on its own; the point is just to make the script a little easier to read and the code less scary to modify. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21t4018 (funcname patterns): make configuration easier to trackLibravatar Jonathan Nieder1-7/+12
Introduce a "test_config" function to set a configuration variable for use by a single test (automatically unsetting it when the assertion finishes). If this function is used consistently, the configuration used in a test_expect_success block can be read at the beginning of that block instead of requiring reading all the tests that come before. So it becomes a little easier to add new tests or rearrange existing ones without fear of breaking configuration. In particular, the test of alternation in xfuncname patterns also checks that xfuncname takes precedence over funcname variable as a sort of side-effect, since the latter leaks in from previous tests. In the new syntax, the test has to say explicitly what variables it is using, making the test clearer and a future regression in coverage from carelessly editing the script less likely. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21t4018 (funcname patterns): make .gitattributes state easier to trackLibravatar Jonathan Nieder1-2/+6
Most, but not all, tests in this script rely on attributes declaring that files with a .java extension should use the "java" driver: *.java diff=java Split out a "set up" test to put such a .gitattributes in place after the tests that do not want it have run, to make it more likely that individual tests other than this setup test can be safely modified, rearranged, or skipped. Presumably this setup code will learn to request other drivers for other extensions in the same place when the test suite learns to exercise other diff drivers. Similarly, make sure that early test assertions that do not use these default attributes set up .gitattributes appropriately for themselves, so tests that run before can be modified with less risk of breaking something. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20Merge branch 'maint'Libravatar Junio C Hamano1-0/+15
* maint: git-svn: Fix git svn log --show-commit
2011-05-20do not read beyond end of malloc'd bufferLibravatar Jim Meyering1-0/+26
With diff.suppress-blank-empty=true, "git diff --word-diff" would output data that had been read from uninitialized heap memory. The problem was that fn_out_consume did not account for the possibility of a line with length 1, i.e., the empty context line that diff.suppress-blank-empty=true converts from " \n" to "\n". Since it assumed there would always be a prefix character (the space), it decremented "len" unconditionally, thus passing len=0 to emit_line, which would then blindly call emit_line_0 with len=-1 which would pass that value on to fwrite as SIZE_MAX. Boom. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20git-svn: Fix git svn log --show-commitLibravatar Michael J Gruber1-0/+15
git svn log --show-commit had no tests and, consequently, no attention by the author of b1b4755 (git-log: put space after commit mark, 2011-03-10) who kept git svn log working only without --show-commit. Introduce a test and fix it. Reported-by: Bernt Hansen <bernt@norang.ca> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19Merge branch 'jl/submodule-conflicted-gitmodules'Libravatar Junio C Hamano1-4/+88
* jl/submodule-conflicted-gitmodules: Submodules: Don't parse .gitmodules when it contains, merge conflicts test that git status works with merge conflict in, .gitmodules
2011-05-19Merge branch 'jc/replacing'Libravatar Junio C Hamano1-2/+16
* jc/replacing: read_sha1_file(): allow selective bypassing of replacement mechanism inline lookup_replace_object() calls read_sha1_file(): get rid of read_sha1_file_repl() madness t6050: make sure we test not just commit replacement Declare lookup_replace_object() in cache.h, not in commit.h Conflicts: environment.c
2011-05-19Merge branch 'nd/sparse-co-fix'Libravatar Junio C Hamano1-4/+49
* nd/sparse-co-fix: sparse checkout: do not eagerly decide the fate for whole directory t1011: fix sparse-checkout initialization and add new file
2011-05-19Merge branch 'ld/p4-preserve-user-names'Libravatar Junio C Hamano1-0/+125
* ld/p4-preserve-user-names: git-p4: warn if git authorship won't be retained git-p4: small improvements to user-preservation git-p4: add option to preserve user names
2011-05-19Merge branch 'jk/git-connection-deadlock-fix'Libravatar Junio C Hamano1-0/+43
* jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c
2011-05-19Merge branch 'jk/cherry-pick-root-with-resolve'Libravatar Junio C Hamano1-2/+25
* jk/cherry-pick-root-with-resolve: t3503: test cherry picking and reverting root commits revert: allow reverting a root commit cherry-pick: handle root commits with external strategies
2011-05-19Merge branch 'jc/maint-pathspec-stdin-and-cmdline'Libravatar Junio C Hamano1-0/+17
* jc/maint-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly Conflicts: revision.c
2011-05-19Revert "Merge branch 'en/merge-recursive'"Libravatar Junio C Hamano1-63/+0
As the band-aid to merge-recursive seems to regress complex merges in an unpleasant way. The merge-recursive implementation needs to be rewritten in such a way that it resolves renames and D/F conflicts entirely in-core and not to touch working tree at all while doing so. But in the meantime, this reverts commit ac9666f84 that merged the topic in its entirety.
2011-05-18ls-remote: the --exit-code option reports "no matching refs"Libravatar Michael Schubert1-0/+24
The "git ls-remote" uses its exit status to indicate if it successfully talked with the remote repository. A new option "--exit-code" makes the command exit with status "2" when there is no refs to be listed, even when the command successfully talked with the remote repository. This way, the caller can tell if we failed to contact the remote, or the remote did not have what we wanted to see. Of course, you can inspect the output from the command, which has been and will continue to be a valid way to check the same thing. Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-18test core.gitproxy configurationLibravatar Jeff King1-0/+43
This is just a basic sanity test to see whether core.gitproxy works at all. Until now, we were not testing anywhere. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-18Add log.abbrevCommit config variableLibravatar Jay Soffian1-0/+53
Add log.abbrevCommit config variable as a convenience for users who often use --abbrev-commit with git log and friends. Allow the option to be overridden with --no-abbrev-commit. Per 635530a2fc and 4f62c2bc57, the config variable is ignored when log is given "--pretty=raw". (Also, a drive-by spelling correction in git log's short help.) Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16Merge branch 'ci/commit--interactive-atomic'Libravatar Junio C Hamano1-4/+17
* ci/commit--interactive-atomic: Test atomic git-commit --interactive Add commit to list of config.singlekey commands Add support for -p/--patch to git-commit Allow git commit --interactive with paths t7501.8: feed a meaningful command Use a temporary index for git commit --interactive
2011-05-16Merge branch 'mg/merge-ff-config'Libravatar Junio C Hamano1-6/+58
* mg/merge-ff-config: tests: check git does not barf on merge.ff values for future versions of git merge: introduce merge.ff configuration variable Conflicts: t/t7600-merge.sh
2011-05-16Merge branch 'jc/t1506-shell-param-expansion-gotcha' into maintLibravatar Junio C Hamano1-2/+5
* jc/t1506-shell-param-expansion-gotcha: t1507: avoid "${parameter<op>'word'}" inside double-quotes
2011-05-16Merge branch 'jc/fix-add-u-unmerged' into maintLibravatar Junio C Hamano1-17/+7
* jc/fix-add-u-unmerged: Fix "add -u" that sometimes fails to resolve unmerged paths Conflicts: builtin/add.c
2011-05-16Merge branch 'jc/maint-branch-mergeoptions' into maintLibravatar Junio C Hamano1-0/+32
* jc/maint-branch-mergeoptions: merge: make branch.<name>.mergeoptions correctly override merge.<option> Conflicts: builtin/merge.c
2011-05-16Merge branch 'jc/maint-add-p-overlapping-hunks' into maintLibravatar Junio C Hamano1-0/+36
* jc/maint-add-p-overlapping-hunks: t3701: add-p-fix makes the last test to pass "add -p": work-around an old laziness that does not coalesce hunks add--interactive.perl: factor out repeated --recount option t3701: Editing a split hunk in an "add -p" session add -p: 'q' should really quit
2011-05-16t3503: test cherry picking and reverting root commitsLibravatar Jeff King1-2/+25
We already tested cherry-picking a root commit, but only with the internal merge-recursive strategy. Let's also test the recently-allowed reverting of a root commit, as well as testing with external strategies (which until recently triggered a segfault). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-15Merge branch 'jm/mergetool-submodules' into maintLibravatar Junio C Hamano1-3/+287
* jm/mergetool-submodules: mergetool: Teach about submodules
2011-05-15Merge branch 'jk/format-patch-quote-special-in-from' into maintLibravatar Junio C Hamano1-0/+42
* jk/format-patch-quote-special-in-from: pretty: quote rfc822 specials in email addresses
2011-05-15t6050: make sure we test not just commit replacementLibravatar Junio C Hamano1-2/+16
The replacement mechanism should affect all types of objects not just commits, so make sure it deals with at least a blob. Signed-off-by: Junio C Hamano <gitster@pobox.com>