1. 16 Nov, 2010 1 commit
    • Add support for 'index add' · c3a20d5c
      Actually add files to the index by creating their corresponding blob and
      storing it on the repository, then getting the hash and updating the
      index file.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  2. 05 Nov, 2010 1 commit
    • Improve error handling · 1795f879
      All initialization functions now return error codes instead of pointers.
      Error codes are now properly propagated on most functions. Several new
      and more specific error codes have been added in common.h
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  3. 27 Oct, 2010 1 commit
    • Fix internal memory management on the library · 58519018
      String mememory is now managed in a much more sane manner.
      
      Fixes include:
      
      	- git_person email and name is no longer limited to 64 characters
      	- git_tree_entry filename is no longer limited to 255 characters
      	- raw objects are properly opened & closed the minimum amount of
      	times required for parsing
      	- unit tests no longer leak
      	- removed 5 other misc memory leaks as reported by Valgrind
      	- tree writeback no longer segfaults on rare ocassions
      
      The git_person struct is no longer public. It is now managed by the
      library, and getter methods are in place to access its internal
      attributes.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  4. 26 Oct, 2010 1 commit
  5. 25 Oct, 2010 2 commits
  6. 19 Sep, 2010 1 commit
    • Give object structures more descriptive names · f49a2e49
      The 'git_obj' structure is now called 'git_rawobj', since
      it represents a raw object read from the ODB.
      
      The 'git_repository_object' structure is now called 'git_object',
      since it's the base object class for all objects.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  7. 12 Aug, 2010 1 commit
    • Redesigned the walking/object lookup interface · 3315782c
      The old 'git_revpool' object has been removed and
      split into two distinct objects with separate
      functionality, in order to have separate methods for
      object management and object walking.
      
      *	A new object 'git_repository' does the high-level
      	management of a repository's objects (commits, trees,
      	tags, etc) on top of a 'git_odb'.
      
      	Eventually, it will also manage other repository
      	attributes (e.g. tag resolution, references, etc).
      
      	See: src/git/repository.h
      
      *	A new external method
      		'git_repository_lookup(repo, oid, type)'
      	has been added to the 'git_repository' API.
      
      	All object lookups (git_XXX_lookup()) are now
      	wrappers to this method, and duplicated code
      	has been removed. The method does automatic type
      	checking and returns a generic 'git_revpool_object'
      	that can be cast to any specific object.
      
      	See: src/git/repository.h
      
      *	The external methods for object parsing of repository
      	objects (git_XXX_parse()) have been removed.
      
      	Loading objects from the repository is now managed
      	through the 'lookup' functions. These objects are
      	loaded with minimal information, and the relevant
      	parsing is done automatically when the user requests
      	any of the parsed attributes through accessor methods.
      
      	An attribute has been added to 'git_repository' in
      	order to force the parsing of all the repository objects
      	immediately after lookup.
      
      	See: src/git/commit.h
      	See: src/git/tag.h
      	See: src/git/tree.h
      
      *	The previous walking functionality of the revpool
      	is now found in 'git_revwalk', which does the actual
      	revision walking on a repository; the attributes
      	when walking through commits in a database have been
      	decoupled from the actual commit objects.
      	This increases performance when accessing commits
      	during the walk and allows to have several
      	'git_revwalk' instances working at the same time on
      	top of the same repository, without having to load
      	commits in memory several times.
      
      	See: src/git/revwalk.h
      
      *	The old 'git_revpool_table' has been renamed to
      	'git_hashtable' and now works as a generic hashtable
      	with support for any kind of object and custom hash
      	functions.
      
      	See: src/hashtable.h
      
      *	All the relevant unit tests have been updated, renamed
      	and grouped accordingly.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  8. 06 Aug, 2010 1 commit
    • Refactor parsing methods · 364788e1
      The 'parse_oid' and 'parse_person' methods which were used by the commit
      parser are now global so they can be used when parsing other objects.
      
      The 'git_commit_person' struct has been changed to a generic
      'git_person'.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  9. 02 Jun, 2010 1 commit
  10. 28 Feb, 2010 1 commit
  11. 20 Jan, 2010 1 commit
  12. 15 Jun, 2009 1 commit
  13. 31 Dec, 2008 2 commits
    • Set GIT_EOSERR when the OS errno should be consulted · 7dd8a9f7
      This error code indicates the OS error code has a better value
      describing the last error, as it is likely a network or local
      file IO problem identified by a C library function call.
      
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Shawn O. Pearce committed
    • Wrap malloc and friends and report out of memory as GIT_ENOMEM · 64a47c01
      We now forbid direct use of malloc, strdup or calloc within the
      library and instead use wrapper functions git__malloc, etc. to
      invoke the underlying library malloc and set git_errno to a no
      memory error code if the allocation fails.
      
      In the future once we have pack objects in memory we are likely
      to enhance these routines with garbage collection logic to purge
      cached pack data when allocations fail.  Because the size of the
      function will grow somewhat large, we don't want to mark them for
      inline as gcc tends to aggressively inline, creating larger than
      expected executables.
      
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Shawn O. Pearce committed
  14. 02 Dec, 2008 1 commit
    • 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
  15. 22 Nov, 2008 1 commit
    • Remove license top-comment from public header files · c6ebb4a9
      Since it's being added when we install the headers anyway,
      we might as well get rid of it. If anything, we should point
      coders to the COPYING file in the project's root directory
      instead of duplicating the same (large-ish) text everywhere.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
  16. 18 Nov, 2008 2 commits
    • Move public headers to src/git · d4043ee9
      It's arguably smoother to keep them close to the source,
      as that's where one's working when modifying them. More
      importantly, though, is the ability to use private headers
      in the src/ dir that simply include "git/$samename.h" to
      get to the public API at the same time.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • s/git_revp/git_revpool/ · 1b9e92c7
      git_revp is something I personally can't stop pronouncing
      "rev pointer". I'm sure others would suffer the same
      problem.
      
      Also, rename the git_revp_ sub-api "gitrp_". This is the
      first of many such renames, primarily done to prevent
      extreme inflation in the "git_" namespace, which we'd like
      to reserve for a higher-level API.
      
      While we're at it, we remove the noise-char "c" from a lot
      of functions. Since revision walking is all about commits,
      the common case should be that we're dealing with commits.
      Exceptions can get a more mnemonic description as needed.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
  17. 04 Nov, 2008 3 commits
  18. 02 Nov, 2008 1 commit
  19. 01 Nov, 2008 5 commits
  20. 31 Oct, 2008 4 commits