1. 30 Apr, 2010 3 commits
  2. 28 Apr, 2010 6 commits
    • Makefile(s): Don't include the OpenSSL crypto library in the link · 19d13c65
      Also, fully purge the NO_OPENSSL build variable.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • Makefile: 'make clean' wipe all editor backup files in src/*/ · f019bd17
      In a similar way to commit 9b173803 ("Make 'make clean' wipe all
      object files in src/*/", 2010-04-14), we use a shell glob when
      removing editor backup files.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • Makefile: Add source for the built-in SHA1 routines to $(SRC_C) · 44debd80
      This results in the 'sparse' and 'coverage' targets including the
      C source files for the built-in SHA1 routines. In addition to the
      sparse check, this results in the generation of the '.gcov' file
      and inclusion in the test coverage report.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • win32: Remove wsock32 from the list of libraries to link · 70aab459
      Commit 5dddf7c8 (Add block-sha1 in favour of the mozilla routines
      2010-04-14) introduced the "bswap.h" header file which, for x86
      or x86-64 machines, provides a "sane" implementation of ntohl()
      and htonl().
      
      The wsock32 library, on the msvc and MinGW build, is only included
      in the link to supply the ntohl()/htonl() routines.  Since we now
      have a built-in implementation, we can remove the wsock32 library
      from the link.
      
      [This will break a Windows build on a non-intel machine]
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • MSVC: Fix some compiler warnings · e272b103
      In particular, using the normal (or production) compiler
      warning level (-W3), msvc complains as follows:
      
      .../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch
      .../sha1.c(270) : warning C4244: 'function' : conversion from \
         'unsigned __int64' to 'unsigned long', possible loss of data
      .../sha1.c(271) : warning C4244: 'function' : conversion from \
         'unsigned __int64' to 'unsigned long', possible loss of data
      
      Note that gcc issues a similar complaint about line 244 when
      compiling with -Wextra.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • MSVC: Fix a syntax error caused by an inline function definition · e2337f39
      Commit 5dddf7c8 (Add block-sha1 in favour of the mozilla routines
      2010-04-14) introduced the "bswap.h" header file which contains
      an inline function (default_swab32()).  The msvc compiler does
      not support the inline keyword which causes the build to fail
      with a syntax error.
      
      However, msvc does support inline functions using the __inline
      keyword language extension.  We already have the GIT_INLINE()
      macro that allows us to hide this syntatic difference. In order
      to fix the build, we simply use GIT_INLINE() in the definition
      of the default_swab32() function.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
  3. 23 Apr, 2010 1 commit
    • Merge remote branch 'ramsay/dev' · fb799dfe
      * ramsay/dev:
        Add a pack index 'virtual function' to fetch an index entry
        Add a pack index 'virtual function' to search by file offset
        Change the interface of the pack index search function
        Add an 64-bit offset table index bounds check for v2 pack index
        Add a minimum size check when opening an v2 pack index file
        win32: Add separate MinGW and MSVC compatability header files
        Makefile: Add support for custom build options in config.mak file
        Fix some coding style issues
      Andreas Ericsson committed
  4. 15 Apr, 2010 1 commit
  5. 14 Apr, 2010 4 commits
    • Add block-sha1 in favour of the mozilla routines · 5dddf7c8
      Since block-sha1 from git.git has such excellent performance, we
      can also get rid of the openssl dependency. It's rather simple
      to add it back later as an optional extra, but we really needn't
      bother to pull in the entire ssl library and have to deal with
      linking issues now that we have the portable and, performance-wise,
      truly excellent block-sha1 code to fall back on.
      
      Since this requires a slight revamp of the build rules anyway, we
      take the opportunity to fix including EXTRA_OBJS in the final build
      as well.
      
      The block-sha1 code was originally implemented for git.git by
      Linus Torvalds <torvalds@linux-foundation.org> and was later
      polished by Nicolas Pitre <nico@cam.org>.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Andreas Ericsson committed
    • Add assembly sha1 implementation for ppc · d15e94c0
      We don't use it yet, but now we have it there at least.
      
      All the non-trivial parts of it appears to have been written
      and contributed to git.git by some anonymous genius. The original
      implementation was done by Paul Mackerras <paulus@samba.org>.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Andreas Ericsson committed
    • Add generic buildrule for assembly files · a7335c51
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Andreas Ericsson committed
    • Make 'make clean' wipe all object files in src/*/ · 9b173803
      Instead of naming the subdirectories explicitly (which will result in
      us forgetting about one sooner or later), we change the shell glob
      pattern to wipe all object files from all subdirectories under src/.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Andreas Ericsson committed
  6. 28 Feb, 2010 8 commits
  7. 01 Feb, 2010 1 commit
  8. 20 Jan, 2010 12 commits
  9. 13 Oct, 2009 4 commits
    • Add the git_oid_to_string() utility function · 960ca1d7
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • Add test-suite coverage testing using gcov · e4553584
      Add a new "coverage" Makefile target that re-builds the
      library and tests using the gcc compiler/linker flags
      required by gcov, runs the test suite to capture the
      runtime data, then compiles a coverage report.
      
      The report, which is saved in a file named "untested",
      consists of a list of untested files, followed by a list
      of untested functions. More detailed execution statistics
      are given in the gcov log files which are saved in the
      top-level directory (named like src#hash.c.gcov).
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • t0101-oid.c: Fix a memory leak reported by valgrind · d2ef83fc
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • Add support for running the tests via valgrind · cac5d927
      Add some makefile targets, which use valgrind's memcheck tool to
      run the tests, in order to help diagnose memory problems in the
      library.
      
      In addition, we enable the '--leak-check' option to report on any
      memory leaks. However, unlike the other memory problems reported
      by memcheck, memory leak reports do not result in an error exit
      from valgrind. (So memory leaks are reported on stderr, but don't
      halt the test run.)
      
      A suppressions file (tests.supp) is included since libz triggers
      some false positives.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed