1. 23 5月, 2012 2 次提交
  2. 05 5月, 2012 1 次提交
    • J
      refs: fix find_containing_dir() regression · 663c1295
      Junio C Hamano 提交于
      The function used to return NULL when asked to find the containing
      directory for a ref that does not exist, allowing the caller to
      omit iteration altogether. But a misconversion in an earlier change
      "refs.c: extract function search_for_subdir()" started returning the
      top-level directory entry, forcing callers to walk everything.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      663c1295
  3. 04 5月, 2012 15 次提交
  4. 26 4月, 2012 1 次提交
  5. 25 4月, 2012 1 次提交
  6. 11 4月, 2012 13 次提交
  7. 13 2月, 2012 1 次提交
  8. 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
  9. 14 12月, 2011 2 次提交
  10. 13 12月, 2011 2 次提交