1. 08 3月, 2010 1 次提交
  2. 26 1月, 2010 1 次提交
  3. 04 1月, 2010 1 次提交
  4. 09 12月, 2009 1 次提交
  5. 07 12月, 2009 1 次提交
  6. 04 12月, 2009 1 次提交
  7. 25 11月, 2009 1 次提交
    • S
      Add Python support library for remote helpers · 2fe40b63
      Sverre Rabbelier 提交于
      This patch introduces parts of a Python package called
      "git_remote_helpers" containing the building blocks for
      remote helpers written in Python.
      
      No actual remote helpers are part of this patch, this patch only
      includes the common basics needed to start writing such helpers.
      
      The patch includes the necessary Makefile additions to build and
      install the git_remote_helpers Python package along with the rest of
      Git.
      
      This patch is based on Johan Herland's git_remote_cvs patch and
      has been improved by the following contributions:
      - David Aguilar: Lots of Python coding style fixes
      - David Aguilar: DESTDIR support in Makefile
      
      Cc: David Aguilar <davvid@gmail.com>
      Cc: Johan Herland <johan@herland.net>
      Signed-off-by: NSverre Rabbelier <srabbelier@gmail.com>
      Signed-off-by: NJohan Herland <johan@herland.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2fe40b63
  8. 18 11月, 2009 1 次提交
  9. 14 11月, 2009 1 次提交
    • J
      Do not use VISUAL editor on dumb terminals · d33738d7
      Jonathan Nieder 提交于
      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: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d33738d7
  10. 29 8月, 2009 1 次提交
  11. 10 8月, 2009 2 次提交
    • J
      tests: allow user to specify trash directory location · f423ef5f
      Jeff King 提交于
      The tests generate a large amount of I/O activity creating
      and destroying repositories and files. We can improve the
      time it takes to run the test suite by creating trash
      directories on filesystems with better performance
      characteristic, even though we may not want the rest of the
      git repository on those filesystems (e.g., because they are
      not network connected, or because they are temporary
      ramdisks).
      
      For example, on a dual processor system:
      
        $ cd t && time make -j32
        real    1m51.562s
        user    0m59.260s
        sys     1m20.933s
      
        # /dev/shm is tmpfs
        $ cd t && time make -j32 GIT_TEST_OPTS="--root=/dev/shm"
        real    1m1.484s
        user    0m53.555s
        sys     1m5.264s
      
      We almost halve the wall clock time, and we utilize the
      dual processors much better.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f423ef5f
    • J
      tests: provide $TRASH_DIRECTORY variable · 91c8b825
      Jeff King 提交于
      Most scripts don't care about the absolute path to the trash
      directory. The one exception was t4014 script, which pieced
      together $TEST_DIRECTORY and $test itself to get an absolute
      directory.
      
      Instead, let's provide a $TRASH_DIRECTORY which specifies
      the same thing. This keeps the $test variable internal to
      test-lib.sh and paves the way for trash directories in other
      locations.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      91c8b825
  12. 02 6月, 2009 2 次提交
  13. 22 4月, 2009 1 次提交
  14. 09 4月, 2009 1 次提交
  15. 28 3月, 2009 1 次提交
  16. 26 3月, 2009 1 次提交
    • J
      t7502-commit: Skip SIGTERM test on Windows · fb9a2bea
      Johannes Sixt 提交于
      The implementation of exec on Windows is just a rough approximation of the
      POSIX behavior. In particular, no real process "overlay" happens (a new
      process is spawned instead and the parent process waits until the child
      terminates). In particular, the process ID cannot be taken by the exec'd
      process. But there is one test in t7502-commit.sh that depends on this.
      We have to skip it on Windows.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      fb9a2bea
  17. 23 3月, 2009 3 次提交
    • J
      t3700: Skip a test with backslashes in pathspec · 6fd1106a
      Johannes Sixt 提交于
      The test verifies that glob special characters can be escaped with
      backslashes.  In particular, the string fo\[ou\]bar is given to git.
      
      On Windows, this does not work because backslashes are first of all
      directory separators, and first thing git does with a pathspec from the
      command line is to convert backslashes to forward slashes.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      6fd1106a
    • J
      ee9fb68c
    • J
      Use prerequisite tags to skip tests that depend on symbolic links · 704a3143
      Johannes Sixt 提交于
      Many tests depend on that symbolic links work.  This introduces a check
      that sets the prerequisite tag SYMLINKS if the file system supports
      symbolic links.  Since so many tests have to check for this prerequisite,
      we do the check in test-lib.sh, so that we don't need to repeat the test
      in many scripts.
      
      To check for 'ln -s' failures, you can use a FAT partition on Linux:
      
      $ mkdosfs -C git-on-fat 1000000
      $ sudo mount -o loop,uid=j6t,gid=users,shortname=winnt git-on-fat /mnt
      
      Clone git to /mnt and
      
      $ GIT_SKIP_TESTS='t0001.1[34] t0010 t1301 t403[34] t4129.[47] t5701.7
                t7701.3 t9100 t9101.26 t9119 t9124.[67] t9200.10 t9600.6' \
              make test
      
      (These additionally skipped tests depend on POSIX permissions that FAT on
      Linux does not provide.)
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      704a3143
  18. 22 3月, 2009 1 次提交
    • J
      test-lib: Infrastructure to test and check for prerequisites · a7bb3940
      Johannes Sixt 提交于
      Some tests can be run only if a particular prerequisite is available. For
      example, some tests require that an UTF-8 locale is available. Here we
      introduce functions that are used in this way:
      
      1. Insert code that checks whether the prerequisite is available. If it is,
         call test_set_prereq with an arbitrary tag name that subsequently can be
         used to check for the prerequisite:
      
            case $LANG in
            *.utf-8)
                  test_set_prereq UTF8
                  ;;
            esac
      
      2. In the calls to test_expect_success pass the tag name:
      
            test_expect_success UTF8 '...description...' '...tests...'
      
      3. There is an auxiliary predicate that can be used anywhere to test for
         a prerequisite explicitly:
      
            if test_have_prereq UTF8
            then
                  ...code to be skipped if prerequisite is not available...
            fi
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      a7bb3940
  19. 20 3月, 2009 6 次提交
    • J
      Tests on Windows: $(pwd) must return Windows-style paths · 4114156a
      Johannes Sixt 提交于
      Many tests pass $(pwd) in some form to git and later test that the output
      of git contains the correct value of $(pwd). For example, the test of
      'git remote show' sets up a remote that contains $(pwd) and then the
      expected result must contain $(pwd).
      
      Again, MSYS-bash's path mangling kicks in: Plain $(pwd) uses the MSYS style
      absolute path /c/path/to/git. The test case would write this name into
      the 'expect' file. But when git is invoked, MSYS-bash converts this name to
      the Windows style path c:/path/to/git, and git would produce this form in
      the result; the test would fail.
      
      We fix this by passing -W to bash's pwd that produces the Windows-style
      path.
      
      There are a two cases that need an accompanying change:
      
      - In t1504 the value of $(pwd) becomes part of a path list. In this case,
        the lone 'c' in something like /foo:c:/path/to/git:/bar inhibits
        MSYS-bashes path mangling; IOW in this case we want the /c/path/to/git
        form to allow path mangling. We use $PWD instead of $(pwd), which always
        has the latter form.
      
      - In t6200, $(pwd) - the Windows style path - must be used to construct the
        expected result because that is the path form that git sees. (The change
        in the test itself is just for consistency: 'git fetch' always sees the
        Windows-style path, with or without the change.)
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      4114156a
    • J
      test-lib: Work around missing sum on Windows · 5397ea31
      Johannes Sixt 提交于
      t1002-read-tree-m-u-2way.sh uses 'sum', but it does not rely on the exact
      form of the sum, only that it is a hash digest. Therefore, we can sneak
      in 'md5sum' under the name 'sum'.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      5397ea31
    • J
      test-lib: Work around incompatible sort and find on Windows · f17e9fbb
      Johannes Sixt 提交于
      If the PATH lists the Windows system directories before the MSYS
      directories, Windows's own incompatible sort and find commands would be
      picked up. We implement these commands as functions and call the real
      tools by absolute path.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      f17e9fbb
    • J
      test-lib: Introduce test_chmod and use it instead of update-index --chmod · 1f553918
      Johannes Sixt 提交于
      This function replaces sequences of 'chmod +x' and 'git update-index
      --chmod=+x' in the test suite, whose purpose is to help filesystems
      that need core.filemode=false. Two places where only 'chmod +x' was used
      we also use this new function.
      
      The function calls 'git update-index --chmod' without checking
      core.filemode (unlike some of the call sites did). We do this because the
      call sites *expect* that the executable bit ends up in the index (ie. it
      is not the purpose of the call sites to *test* whether git treats
      'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on
      filesystems with core.filemode=true the 'git update-index --chmod' is a
      no-op.
      
      The function uses --add with update-index to help one call site in
      t6031-merge-recursive. It makes no difference for the other callers.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      1f553918
    • J
      test-lib: Simplify test counting. · 8586f98b
      Johannes Sixt 提交于
      Since the test case counter was incremented very late, there were a few
      users of the counter had to do their own incrementing. Now we increment it
      early and simplify these users.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      8586f98b
    • J
      test-lib: Replace uses of $(expr ...) by POSIX shell features. · d5d9de1b
      Johannes Sixt 提交于
      In particular:
      
      - Test case counting can be achieved by arithmetic expansion.
      
      - The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      d5d9de1b
  20. 17 3月, 2009 2 次提交
  21. 15 3月, 2009 1 次提交
  22. 19 2月, 2009 1 次提交
  23. 04 2月, 2009 6 次提交
    • J
    • J
      Tests: let --valgrind imply --verbose and --tee · 3da93652
      Johannes Schindelin 提交于
      It does not make much sense to run the (expensive) valgrind tests and
      not look at the output.
      
      To prevent output from scrolling out of reach, the parameter --tee is
      implied, too.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3da93652
    • J
      test-lib.sh: optionally output to test-results/$TEST.out, too · 44138559
      Johannes Schindelin 提交于
      When tests are run in parallel and a few tests fail, it does not help
      that the output of the terminal is totally confusing, as you rarely know
      which test which line came from.
      
      So introduce the option '--tee' which triggers that the output of the
      tests will be written to t/test-results/$TEST.out in addition to the
      terminal, where $TEST is the basename of the script.
      
      Unfortunately, there seems to be no way to redirect a given file
      descriptor to a specified subprocess in POSIX shell, only redirection
      to a file is supported via 'exec > $FILE'.
      
      At least with bash, one might think that 'exec >($COMMAND)' would work
      as intended, but it does not.
      
      The common way to work around the lack of proper tools support is to
      work with named pipes, alas, one of our most beloved platforms does not
      really support named pipes.  Besides, we would need a pipe for every
      script, as the whole point of this patch is to allow parallel execution.
      
      Therefore, we handle the redirection in the following way: when '--tee'
      was passed to the test script, the variable GIT_TEST_TEE_STARTED is set
      (to avoid triggering that code path again) and the script is started
      _again_, in a subshell, redirected to the command "tee".
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      44138559
    • J
      Valgrind support: check for more than just programming errors · efd92ffd
      Johannes Schindelin 提交于
      This patch makes --valgrind try to override _all_ Git binaries in the
      PATH, and it makes it an error to call *.sh and *.perl scripts directly.
      
      While it is not strictly necessary to look through the whole PATH to
      find git binaries to override, it is in line with running an expensive
      test (which valgrind is) to make extra sure that only binaries are
      tested that actually come from the git.git checkout.
      
      In the same spirit, we can test that neither our test suite nor our
      scripts try to run the *.sh or *.perl scripts directly.
      
      It's more like a "because we can" than a "this is tightly connected
      to valgrind", but in the author's opinion "because we can" is "so we
      should" in this case.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      efd92ffd
    • J
      Add valgrind support in test scripts · 4e1be63c
      Johannes Schindelin 提交于
      This patch adds the ability to use valgrind's memcheck tool to
      diagnose memory problems in Git while running the test scripts.
      
      It requires valgrind 3.4.0 or newer.
      
      It works by creating symlinks to a valgrind script, which have the same
      name as our Git binaries, and then putting that directory in front of
      the test script's PATH as well as set GIT_EXEC_PATH to that directory.
      Git scripts are symlinked from that directory directly.
      
      That way, Git binaries called by Git scripts are valgrinded, too.
      
      Valgrind can be used by specifying "GIT_TEST_OPTS=--valgrind" in the
      make invocation. Any invocation of git that finds any errors under
      valgrind will exit with failure code 126. Any valgrind output will go
      to the usual stderr channel for tests (i.e., /dev/null, unless -v has
      been specified).
      
      If you need to pass options to valgrind -- you might want to run
      another tool than memcheck, for example -- you can set the environment
      variable GIT_VALGRIND_OPTIONS.
      
      A few default suppressions are included, since libz seems to trigger
      quite a few false positives. We'll assume that libz works and that we
      can ignore any errors which are reported there.
      
      Note: it is safe to run the valgrind tests in parallel, as the links in
      t/valgrind/bin/ are created using proper locking.
      
      Initial patch and all the hard work by Jeff King.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4e1be63c
    • J
      tests: fix test_commit() for case insensitive filesystems · e656fc97
      Junio C Hamano 提交于
      Brian Gernhardt noticed that t3411 was broken recently on case insensitive
      filesystems.
      
      00884968 (test-lib.sh: introduce test_commit() and test_merge() helpers,
      2009-01-27) used a tag and a file with the same name, only different in
      case, and converted many existing tests that needed only a file (or a
      tag).
      
      Some tests may want to refer to a rev or a file, but on a filesystem that
      loses cases, referring to either without disambiguation mark ("--") on the
      command line now triggers an error (t3411 was the only one such test).
      
      Fix it by using a filename that is different from the tagname each step
      creates.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e656fc97
  24. 29 1月, 2009 1 次提交
    • J
      test-lib.sh: introduce test_commit() and test_merge() helpers · 00884968
      Johannes Schindelin 提交于
      Often we just need to add a commit with a given (short) name, that will
      be tagged with the same name.  Now, relatively complicated graphs can be
      constructed easily and in a clear fashion:
      
      	test_commit A &&
      	test_commit B &&
      	git checkout A &&
      	test_commit C &&
      	test_merge D B
      
      will construct this graph:
      
      	A - B
      	  \   \
      	    C - D
      
      For simplicity, files whose name is the lower case version of the commit
      message (to avoid a warning about ambiguous names) will be committed, with
      the corresponding commit messages as contents.
      
      If you need to provide a different file/different contents, you can use
      the more explicit form
      
      	test_commit $MESSAGE $FILENAME $CONTENTS
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      00884968
  25. 20 1月, 2009 1 次提交
    • M
      use uppercase POSIX compliant signals for the 'trap' command · 35641310
      Markus Heidelberg 提交于
      In 'man 1p trap' there is written:
      
          "Implementations may permit names with the SIG prefix or ignore case
          in signal names as an extension."
      
      So change the lowercase signals to uppercase, which is POSIX compliant
      instead of being an extension.
      
      There wasn't anybody claiming that it doesn't work, but there was a bug
      with using a signal with the SIG prefix, which is an extension as well.
      So let's play it safe and change it, since it doesn't hurt anyone.
      
      While at it, also convert 8 indentation spaces to 1 tab character.
      Signed-off-by: NMarkus Heidelberg <markus.heidelberg@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      35641310