1. 31 Dec, 2008 14 commits
  2. 30 Dec, 2008 5 commits
    • Add a routine to determine a git_oid given an git_obj · c960d6a3
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Add some routines for SHA1 hash computation · 007e0753
      [sp: Changed signature for output to use git_oid, and added
           a test case to verify an allocated git_hash_ctx can be
           reinitialized and reused.]
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Fix a bug in gitfo_read_file() · 42fd40db
      In particular, when asked to read an empty file, this function
      calls malloc() with a zero size allocation request. Standard C
      says that the behaviour of malloc() in this case is implementation
      defined.
      
      [C99, 7.20.3 says "... If the size of the space requested is zero,
      the behavior is implementation-defined: either a null pointer is
      returned, or the behavior is as if the size were some nonzero
      value, except that the returned pointer shall not be used to
      access an object."]
      
      Finesse the issue by over-allocating by one byte. Setting the extra
      byte to '\0' may also provide a useful sentinel for text files.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Add pkg-config support. · d7fbfe15
      The libgit2.pc is generated on make install and installed, to allow
      using the lib through the pkg-config helper.
      
      Signed-off-by: Steve Frécinaux <code@istique.net>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Steve Frécinaux committed
    • Add make install and uninstall targets. · 5ddbd5ed
      It accepts a prefix= parameter (default: /usr/local).
      
      Signed-off-by: Steve Frécinaux <code@istique.net>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Steve Frécinaux committed
  3. 19 Dec, 2008 2 commits
    • Implement git_odb__read_loose() · 3d3552e8
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Add a file reading routine along with an io buffer type · 75d58430
      In particular, the gitfo_read_file() routine can be used to slurp
      the complete file contents into an gitfo_buf structure. The buffer
      content will be allocated by malloc() and may be released by the
      gitfo_free_buf() routine. The io buffer type can be initialised
      on the stack with the GITFO_BUF_INIT macro.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
  4. 18 Dec, 2008 2 commits
  5. 10 Dec, 2008 1 commit
  6. 09 Dec, 2008 4 commits
  7. 02 Dec, 2008 12 commits
    • Add routines to convert git_oid to hex strings · af795e49
      [sp: Credit for some of this implementation goes to Pieter, I
           started off a patch he proposed for libgit2 but reworked
           enough of it that I don't want to blame him for any bugs.]
      
      Suggested-by: Pieter de Bie <pdebie@ai.rug.nl>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Shawn O. Pearce committed
    • Diasble TLS on cygwin · b72ca267
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Acked-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Use __CHECKER__ to detect when sparse is running · 17643760
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Acked-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Use cgcc in the sparse target · 80133dad
      cgcc is the recommended way to run sparse, since it provides
      many -Defines suitable to the given gcc platform. For example,
      on some Ubuntu/glibc versions, a plain sparse invocation gives
      the following warning:
      
          "warning: This machine appears to be neither x86_64 nor i386."
      
      Using "cgcc -no-compile" instead eliminates this warning.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Acked-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Fixup documentation to reflect the "git_obj" rename · 43288a07
      commit dff79e27 renamed
      the (small object) "git_sobj" to a plain "git_obj", but
      neglected to update some of the documentation to reflect
      that change.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Add a dirent walker to the fileops API · ea790f33
      Since at least MS have something like GetFirstDirEnt() and
      GetNextDirEnt() (presumably with superior performance), we
      can let MS hackers add support for a dirent walker using
      that API instead, while we stick with the posix-style
      readdir() calls.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Add an io caching layer to the gitfo api · 4188d28f
      The idea is taken from Junio's work in read-cache.c, where
      it's used for writing out the index without tap-dancing on
      the poor harddrive. Since it's almost certainly useful for
      cached writing of packfiles too, we turn it into a generic
      API, making it perfectly simple to reuse it later.
      
      gitfo_write_cached() has the same contract as gitfo_write(), it
      returns GIT_SUCCESS if all bytes are successfully written (or were
      at least buffered for later writing), and <0 if an error occurs
      during buffer writing.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Remove config.h and make fileops an internal API · ec250c6e
      Since it doesn't make sense to make the disk access stuff
      portable *AND* public (that's a job for each application
      imo), we can take a shortcut and just support unixy stuff
      for now and get away with coding most of it as macros.
      
      Since we go with an internal API for starters and only
      provide higher-level API's to the libgit users, we'll be
      ok with this approach.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • doxygen config: Update path to public headers · 42c07750
      In d4043ee9, public headers
      were moved from include/git to src/git, but the doxygen
      configuration wasn't updated to reflect this. This patch
      amends that slippage, making documentation generation once
      again work as intended.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Add a new author state "ign" to git.git-authors · 634a64b1
      This is to be used for application code that currently
      resides in git, but only for authors whose only not
      insignificant contributions are for that code (such as
      "imap-send").
      
      Presently, this is used for Mike McCormack and Robert
      Shearman.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Add Kristian Høgsberg to the list of consenting authors · 9e300586
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Add Adam Simpkins as ??? to git.git-authors · 0cfd861b
      Adam has made significant contributions to the http
      transport code, but his listed email address is no longer
      valid.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed