1. 04 5月, 2012 8 次提交
  2. 26 4月, 2012 1 次提交
  3. 11 4月, 2012 13 次提交
  4. 13 2月, 2012 1 次提交
  5. 18 1月, 2012 2 次提交
    • M
      add_packed_ref(): new function in the refs API. · 30249ee6
      Michael Haggerty 提交于
      Add a new function add_packed_ref() that adds a reference directly to
      the in-memory packed reference cache.  This will be useful for
      creating local references while cloning.
      Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      30249ee6
    • M
      ref_array: keep track of whether references are sorted · e6ed3ca6
      Michael Haggerty 提交于
      Keep track of how many entries at the beginning of a ref_array are already
      sorted.  In sort_ref_array(), return early if the the array is already
      sorted (i.e., if no new references has been appended to the end of the
      list since the last call to sort_ref_array()).
      
      Sort ref_arrays only when needed, namely in search_ref_array() and in
      do_for_each_ref().  However, never call sort_ref_array() on the
      extra_refs, because extra_refs can contain multiple entries with the same
      name and because sort_ref_array() not only sorts, but de-dups its
      contents.
      
      This change is currently not useful, because entries are not added to
      ref_arrays after they are created.  But in a moment they will be...
      
      Implementation note: we could store a binary "sorted" value instead of
      an integer, but storing the number of sorted entries leaves the way
      open for a couple of possible future optimizations:
      
      * In sort_ref_array(), sort *only* the unsorted entries, then merge
        them with the sorted entries.  This should be faster if most of the
        entries are already sorted.
      
      * Teach search_ref_array() to do a binary search of any sorted
        entries, and if unsuccessful do a linear search of any unsorted
        entries.  This would avoid the need to sort the list every time that
        search_ref_array() is called, and (given some intelligence about how
        often to sort) could significantly improve the speed in certain
        hypothetical usage patterns.
      Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e6ed3ca6
  6. 14 12月, 2011 2 次提交
  7. 13 12月, 2011 13 次提交