1. 17 5月, 2009 1 次提交
  2. 10 5月, 2009 1 次提交
  3. 02 5月, 2009 1 次提交
  4. 30 4月, 2009 1 次提交
  5. 29 4月, 2009 1 次提交
  6. 28 4月, 2009 2 次提交
  7. 27 4月, 2009 1 次提交
  8. 26 4月, 2009 1 次提交
  9. 24 4月, 2009 1 次提交
  10. 21 4月, 2009 1 次提交
    • J
      Windows: Skip fstat/lstat optimization in write_entry() · 34779c53
      Johannes Sixt 提交于
      Commit e4c72923 (write_entry(): use fstat() instead of lstat() when file
      is open, 2009-02-09) introduced an optimization of write_entry().
      Unfortunately, we cannot take advantage of this optimization on Windows
      because there is no guarantee that the time stamps are updated before the
      file is closed:
      
        "The only guarantee about a file timestamp is that the file time is
         correctly reflected when the handle that makes the change is closed."
      
      (http://msdn.microsoft.com/en-us/library/ms724290(VS.85).aspx)
      
      The failure of this optimization on Windows can be observed most easily by
      running a 'git checkout' that has to update several large files. In this
      case, 'git checkout' will report modified files, but infact only the
      timestamps were incorrectly recorded in the index, as can be verified by a
      subsequent 'git diff', which shows no change.
      
      Dmitry Potapov reports the same fix needs on Cygwin; this commit contains
      his updates for that.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      34779c53
  11. 20 4月, 2009 1 次提交
  12. 09 4月, 2009 2 次提交
    • J
      tests: skip perl tests if NO_PERL is defined · 1b19ccd2
      Jeff King 提交于
      These scripts all test git programs that are written in
      perl, and thus obviously won't work if NO_PERL is defined.
      We pass NO_PERL to the scripts from the building Makefile
      via the GIT-BUILD-OPTIONS file.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b19ccd2
    • J
      Makefile: allow building without perl · 499c2939
      Jeff King 提交于
      For systems with a missing or broken perl, it is nicer to
      explicitly say "we don't want perl" because:
      
        1. The Makefile knows not to bother with Perl-ish things
           like Git.pm.
      
        2. We can print a more user-friendly error message
           than "foo is not a git command" or whatever the broken
           perl might barf
      
        3. Test scripts that require perl can mark themselves and
           such and be skipped
      
      This patch implements parts (1) and (2). The perl/
      subdirectory is skipped entirely, gitweb is not built, and
      any git commands which rely on perl will print a
      human-readable message and exit with an error code.
      
      This patch is based on one from Robin H. Johnson.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      499c2939
  13. 08 4月, 2009 2 次提交
  14. 05 4月, 2009 2 次提交
  15. 30 3月, 2009 1 次提交
  16. 26 3月, 2009 1 次提交
  17. 23 3月, 2009 1 次提交
  18. 19 3月, 2009 1 次提交
    • J
      MinGW: implement mmap · b130a72b
      Janos Laube 提交于
      Add USE_WIN32_MMAP which triggers the use of windows' native
      file memory mapping functionality in git_mmap()/git_munmap() functions.
      
      As git functions currently use mmap with MAP_PRIVATE set only, this
      implementation supports only that mode for now.
      
      On Windows, offsets for memory mapped files need to match the allocation
      granularity. Take this into account when calculating the packed git-
      windowsize and file offsets. At the moment, the only function which makes
      use of offsets in conjunction with mmap is use_pack() in sha1-file.c.
      
      Git fast-import's code path tries to map a portion of the temporary
      packfile that exceeds the current filesize, i.e. offset+length is
      greater than the filesize. The NO_MMAP code worked with that since pread()
      just reads the file content until EOF and returns gracefully, while
      MapViewOfFile() aborts the mapping and returns 'Access Denied'.
      Working around that by determining the filesize and adjusting the length
      parameter.
      Signed-off-by: NJanos Laube <janos.dev@gmail.com>
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b130a72b
  19. 09 3月, 2009 2 次提交
  20. 08 3月, 2009 1 次提交
    • K
      Record ns-timestamps if possible, but do not use it without USE_NSEC · c06ff490
      Kjetil Barvik 提交于
      Traditionally, the lack of USE_NSEC meant "do not record nor use the
      nanosecond resolution part of the file timestamps".  To avoid problems on
      filesystems that lose the ns part when the metadata is flushed to the disk
      and then later read back in, disabling USE_NSEC has been a good idea in
      general.
      
      If you are on a filesystem without such an issue, it does not hurt to read
      and store them in the cached stat data in the index entries even if your
      git is compiled without USE_NSEC.  The index left with such a version of
      git can be read by git compiled with USE_NSEC and it can make use of the
      nanosecond part to optimize the check to see if the path on the filesystem
      hsa been modified since we last looked at.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c06ff490
  21. 26 2月, 2009 1 次提交
    • J
      add basic http clone/fetch tests · 119c8eee
      Jeff King 提交于
      This was mostly being tested implicitly by the "http push"
      tests. But making a separate test script means that:
      
        - we will run fetch tests even when http pushing support
          is not built
      
        - when there are failures on fetching, they are easier to
          see and isolate, as they are not in the middle of push
          tests
      
      This script defaults to running the webserver on port 5550,
      and puts the original t5540 on port 5540, so that the two
      can be run simultaneously without conflict (but both still
      respect an externally set LIB_HTTPD_PORT).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      119c8eee
  22. 25 2月, 2009 1 次提交
  23. 20 2月, 2009 1 次提交
    • T
      Support coverage testing with GCC/gcov · 901c369a
      Thomas Rast 提交于
      With gcc's --coverage option, we can perform automatic coverage data
      collection for the test suite.
      
      Add a new Makefile target 'coverage' that scraps all previous coverage
      results, recompiles git with the required compiler/linker flags (in
      addition to any flags you specify manually), then runs the test suite
      and compiles a report.
      
      The compilation must be done with all optimizations disabled, since
      inlined functions (and for line-by-line coverage, also optimized
      branches/loops) break coverage tracking.
      
      The tests are run serially (with -j1).  The coverage code should
      theoretically allow concurrent access to its data files, but the
      author saw random test failures.  Obviously this could be improved.
      
      The report currently consists of a list of functions that were never
      executed during the tests, which is written to
      'coverage-untested-functions'.  Once this list becomes reasonably
      short, we would also want to look at branches that were never taken.
      
      Currently only toplevel *.c files are considered.  It would be nice to
      at least include xdiff, but --coverage did not save data to
      subdirectories on the system used to write this (gcc 4.3.2).
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      901c369a
  24. 11 2月, 2009 3 次提交
  25. 05 2月, 2009 2 次提交
    • J
      Makefile: minor improvements for Mac OS X (Darwin) · 7233d221
      Jay Soffian 提交于
      1) Instead of requesting OLD_ICONV on all Mac OS X versions except for 10.5
      (which will break when 10.6 is released), exlicitly request it for versions
      older than 10.5.
      
      2) NO_STRLCPY is not needed since Mac OS X 10.2. Noticed by Benjamin Kramer.
      
      Note that uname -r returns the underlying Darwin version, which can be mapped
      to Mac OS X version at http://www.opensource.apple.com/darwinsource/Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7233d221
    • J
      Makefile: fix misdetection of relative pathnames · 0c0ead7e
      Junio C Hamano 提交于
      The installation rules wanted to differentiate between a template_dir that
      is given as an absolute path (e.g. /usr/share/git-core/templates) and a
      relative one (e.g. share/git-core/templates) but it was done by checking
      if $(abspath $(template_dir)) and $(template_dir) yield the same string.
      
      This was wrong in at least two ways.
      
       * The user can give template_dir with a trailing slash from the command
         line to invoke make or from the included config.mak.  A directory path
         ought to mean the same thing with or without such a trailing slash but
         use of $(abspath) means an absolute path with a trailing slash fails
         the test.
      
       * Versions of GNU make older than 3.81 do not have $(abspath) to begin
         with.
      
      This changes the detection logic to see if the given path begins with a
      slash.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0c0ead7e
  26. 04 2月, 2009 1 次提交
  27. 29 1月, 2009 1 次提交
  28. 27 1月, 2009 1 次提交
  29. 26 1月, 2009 3 次提交
    • S
      Windows: Revert to default paths and convert them by RUNTIME_PREFIX · 25655221
      Steffen Prohaska 提交于
      The RUNTIME_PREFIX mechanism allows us to use the default paths on
      Windows too.  Defining RUNTIME_PREFIX explicitly requests for
      translation of paths relative to the executable at runtime.
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Acked-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      25655221
    • S
      Compute prefix at runtime if RUNTIME_PREFIX is set · 35fb0e86
      Steffen Prohaska 提交于
      This commit adds support for relocatable binaries (called
      RUNTIME_PREFIX).  Such binaries can be moved together with the
      system configuration files to a different directory, as long as the
      relative paths from the binary to the configuration files is
      preserved.  This functionality is essential on Windows where we
      deliver git binaries with an installer that allows to freely choose
      the installation location.
      
      If RUNTIME_PREFIX is unset we use the static prefix.  This will be
      the default on Unix.  Thus, the behavior on Unix will remain
      identical to the old implementation, which used to add the prefix
      in the Makefile.
      
      If RUNTIME_PREFIX is set the prefix is computed from the location
      of the executable.  In this case, system_path() tries to strip
      known directories that executables can be located in from the path
      of the executable.  If the path is successfully stripped it is used
      as the prefix.  For example, if the executable is
      "/msysgit/bin/git" and BINDIR is "bin", then the prefix computed is
      "/msysgit".
      
      If the runtime prefix computation fails, we fall back to the static
      prefix specified in the makefile.  This can be the case if the
      executable is not installed at a known location.  Note that our
      test system sets GIT_CONFIG_NOSYSTEM to tell git to ignore global
      configuration files during testing.  Hence testing does not trigger
      the fall back.
      
      Note that RUNTIME_PREFIX only works on Windows, though adding
      support on Unix should not be too hard.  The implementation
      requires argv0_path to be set to an absolute path.  argv0_path must
      point to the directory of the executable.  We use assert() to
      verify this in debug builds.  On Windows, the wrapper for main()
      (see compat/mingw.h) guarantees that argv0_path is correctly
      initialized.  On Unix, further work is required before
      RUNTIME_PREFIX can be enabled.
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Acked-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      35fb0e86
    • S
      Move computation of absolute paths from Makefile to runtime (in preparation for RUNTIME_PREFIX) · 026fa0d5
      Steffen Prohaska 提交于
      This commit prepares the Makefile for relocatable binaries (called
      RUNTIME_PREFIX).  Such binaries will be able to be moved together
      with the system configuration files to a different directory,
      requiring to compute the prefix at runtime.
      
      In a first step, we make all paths relative in the Makefile and
      teach system_path() to add the prefix instead.  We used to compute
      absolute paths in the Makefile and passed them to C as defines.  We
      now pass relative paths to C and call system_path() to add the
      prefix at runtime.
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Acked-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      026fa0d5
  30. 22 1月, 2009 1 次提交
    • J
      chain kill signals for cleanup functions · 4a16d072
      Jeff King 提交于
      If a piece of code wanted to do some cleanup before exiting
      (e.g., cleaning up a lockfile or a tempfile), our usual
      strategy was to install a signal handler that did something
      like this:
      
        do_cleanup(); /* actual work */
        signal(signo, SIG_DFL); /* restore previous behavior */
        raise(signo); /* deliver signal, killing ourselves */
      
      For a single handler, this works fine. However, if we want
      to clean up two _different_ things, we run into a problem.
      The most recently installed handler will run, but when it
      removes itself as a handler, it doesn't put back the first
      handler.
      
      This patch introduces sigchain, a tiny library for handling
      a stack of signal handlers. You sigchain_push each handler,
      and use sigchain_pop to restore whoever was before you in
      the stack.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4a16d072