1. 29 Jan, 2013 1 commit
  2. 27 Jan, 2013 1 commit
  3. 08 Jan, 2013 1 commit
  4. 27 Nov, 2012 2 commits
  5. 30 Oct, 2012 2 commits
    • Move rename detection into new file · db106d01
      This improves the naming for the rename related functionality
      moving it to be called `git_diff_find_similar()` and renaming
      all the associated constants, etc. to make more sense.
      
      I also moved the new code (plus the existing `git_diff_merge`)
      into a new file `diff_tform.c` where I can put new functions
      related to manipulating git diff lists.
      
      This also updates the implementation significantly from the
      last revision fixing some ordering issues (where break-rewrite
      needs to be handled prior to copy and rename detection) and
      improving config option handling.
      Russell Belfer committed
    • index refactoring · f45ec1a0
      Edward Thomson committed
  6. 17 Sep, 2012 1 commit
  7. 24 Jul, 2012 1 commit
  8. 17 May, 2012 2 commits
  9. 15 May, 2012 1 commit
    • Ranged iterators and rewritten git_status_file · 41a82592
      The goal of this work is to rewrite git_status_file to use the
      same underlying code as git_status_foreach.
      
      This is done in 3 phases:
      
      1. Extend iterators to allow ranged iteration with start and
         end prefixes for the range of file names to be covered.
      2. Improve diff so that when there is a pathspec and there is
         a common non-wildcard prefix of the pathspec, it will use
         ranged iterators to minimize excess iteration.
      3. Rewrite git_status_file to call git_status_foreach_ext
         with a pathspec that covers just the one file being checked.
      
      Since ranged iterators underlie the status & diff implementation,
      this is actually fairly efficient.  The workdir iterator does
      end up loading the contents of all the directories down to the
      single file, which should ideally be avoided, but it is pretty
      good.
      Russell Belfer committed
  10. 17 Apr, 2012 1 commit
  11. 07 Mar, 2012 1 commit
  12. 02 Mar, 2012 1 commit
    • Update diff to use iterators · 74fa4bfa
      This is a major reorganization of the diff code.  This changes
      the diff functions to use the iterators for traversing the
      content.  This allowed a lot of code to be simplified.  Also,
      this moved the functions relating to outputting a diff into a
      new file (diff_output.c).
      
      This includes a number of other changes - adding utility
      functions, extending iterators, etc. plus more tests for the
      diff code.  This also takes the example diff.c program much
      further in terms of emulating git-diff command line options.
      Russell Belfer committed
  13. 22 Feb, 2012 1 commit
    • Fix iterators based on pull request feedback · 0534641d
      This update addresses all of the feedback in pull request #570.
      
      The biggest change was to create actual linked list stacks for
      storing the tree and workdir iterator state.  This cleaned up
      the code a ton.  Additionally, all of the static functions had
      their 'git_' prefix removed, and a lot of other unnecessary
      changes were removed from the original patch.
      Russell Belfer committed
  14. 21 Feb, 2012 1 commit
    • Uniform iterators for trees, index, and workdir · b6c93aef
      This create a new git_iterator type of object that provides a
      uniform interface for iterating over the index, an arbitrary
      tree, or the working directory of a repository.
      
      As part of this, git ignore support was extended to support
      push and pop of directory-based ignore files as the working
      directory is being traversed (so the array of ignores does
      not have to be recreated at each directory during traveral).
      
      There are a number of other small utility functions in buffer,
      path, vector, and fileops that are included in this patch
      that made the iterator implementation cleaner.
      Russell Belfer committed
  15. 13 Feb, 2012 1 commit
  16. 30 Dec, 2011 1 commit
    • Improved gitattributes macro implementation · bd370b14
      This updates to implementation of gitattribute macros to be much more
      similar to core git (albeit not 100%) and to handle expansion of
      macros within macros, etc.  It also cleans up the refcounting usage
      with macros to be much cleaner.
      
      Also, this adds a new vector function `git_vector_insert_sorted()`
      which allows you to maintain a sorted list as you go.  In order to
      write that function, this changes the function `git__bsearch()` to
      take a somewhat different set of parameters, although the core
      functionality is still the same.
      Russell Belfer committed
  17. 21 Dec, 2011 1 commit
    • Add APIs for git attributes · ee1f0b1a
      This adds APIs for querying git attributes.  In addition to
      the new API in include/git2/attr.h, most of the action is in
      src/attr_file.[hc] which contains utilities for dealing with
      a single attributes file, and src/attr.[hc] which contains
      the implementation of the APIs that merge all applicable
      attributes files.
      Russell Belfer committed
  18. 29 Oct, 2011 1 commit
  19. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  20. 07 Jul, 2011 1 commit
    • vector: Timsort all of the things · de18f276
      Drop the GLibc implementation of Merge Sort and replace it with Timsort.
      
      The algorithm has been tuned to work on arrays of pointers (void **),
      so there's no longer a need to abstract the byte-width of each element
      in the array.
      
      All the comparison callbacks now take pointers-to-elements, not
      pointers-to-pointers, so there's now one less level of dereferencing.
      
      E.g.
      
      	 int index_cmp(const void *a, const void *b)
      	 {
      	-	const git_index_entry *entry_a = *(const git_index_entry **)(a);
      	+	const git_index_entry *entry_a = (const git_index_entry *)(a);
      
      The result is up to a 40% speed-up when sorting vectors. Memory usage
      remains lineal.
      
      A new `bsearch` implementation has been added, whose callback also
      supplies pointer-to-elements, to uniform the Vector API again.
      Vicent Marti committed
  21. 05 Jul, 2011 2 commits
    • vector: implement git_vector_uniq() · 476c42ac
      The routine remove duplictes from the vector. Only the last added element
      of elements with equal keys remains in the vector.
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • vector, index: use git__msort() for vector sorting · 0b0a6b11
      Index operation use git_vector_sort() to sort index entries. Since index
      support adding duplicates (two or more entries with the same path), it's
      important to preserve order of elements. Preserving order of elements
      allows to make decisions based on order. For example it's possible to
      implement function witch removes all duplicates except last added.
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
  22. 01 Jul, 2011 1 commit
  23. 11 May, 2011 1 commit
  24. 03 Mar, 2011 5 commits
    • Fix compilation in MSVC · 3c41c635
      MSVC cannot substract void pointers. Go figure.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
    • Implement reference counting for git_objects · 48c27f86
      All `git_object` instances looked up from the repository are reference
      counted. User is expected to use the new `git_object_close` when an
      object is no longer needed to force freeing it.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
    • Fix searching in git_vector · 86d7e1ca
      We now store only one sorting callback that does entry comparison. This
      is used when sorting the entries using a quicksort, and when looking for
      a specific entry with the new search methods.
      
      The following search methods now exist:
      
      	git_vector_search(vector, entry)
      	git_vector_search2(vector, custom_search_callback, key)
      
      	git_vector_bsearch(vector, entry)
      	git_vector_bsearch2(vector, custom_search_callback, key)
      
      The sorting state of the vector is now stored internally.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
    • Fix warnings in vector.c · da7c3c71
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
    • Split packed from unpacked references · 86194b24
      These two reference types are now stored separately to eventually allow
      the removal/renaming of loose references and rewriting of the refs
      packfile.
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed
  25. 08 Jan, 2011 1 commit
    • Fixed two buffer handling errors in vector.c · a17777d1
      - remove() would read one-past array bounds.
      - resize() would fail if the initial size was 1, because it multiplied by 1.75
        and truncated the resulting value. The buffer would always remain at size 1,
        but elements would repeatedly be appended (via insert()) causing a crash.
      Alex Budovski committed
  26. 06 Dec, 2010 1 commit
  27. 02 Dec, 2010 1 commit
    • Refactor all 'vector' functions into common code · c4034e63
      All the operations on the 'git_index_entry' array and the
      'git_tree_entry' array have been refactored into common code in the
      src/vector.c file.
      
      The new vector methods support:
      	- insertion:	O(1) (avg)
      	- deletion:		O(n)
      	- searching:	O(logn)
      	- sorting:		O(logn)
      	- r. access:	O(1)
      
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      Vicent Marti committed