1. 06 5月, 2009 8 次提交
  2. 04 5月, 2009 11 次提交
  3. 02 5月, 2009 1 次提交
  4. 30 4月, 2009 3 次提交
  5. 28 4月, 2009 5 次提交
  6. 25 4月, 2009 2 次提交
  7. 23 4月, 2009 1 次提交
  8. 21 4月, 2009 5 次提交
  9. 20 4月, 2009 4 次提交
    • J
      checkout branch: prime cache-tree fully · 83ae209b
      Junio C Hamano 提交于
      When switching to another branch, the earlier code relied on incremental
      invalidation of cache-tree entries to degrade it.  While it is not wrong
      per-se, we know that the resulting index must fully match the branch we
      are switching to unless the -m (merge) option is used.
      
      We should simply fully re-prime the cache-tree using the new tree object
      in such a case.  And for safety, invalidate the cache-tree as a whole in
      other cases.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      83ae209b
    • J
      read-tree -m A B: prime cache-tree from the switched-to tree · 456156dc
      Junio C Hamano 提交于
      When switching to a new branch with "read-tree -m A B", the resulting
      index must match tree B and we can prime the cache tree with it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      456156dc
    • J
      Move prime_cache_tree() to cache-tree.c · b9d37a54
      Junio C Hamano 提交于
      The interface to build cache-tree belongs there.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b9d37a54
    • J
      read-tree A B: do not corrupt cache-tree · 8cc21ce7
      Junio C Hamano 提交于
      An earlier commit aab3b9a1 (read-tree A B C: do not create a bogus index
      and do not segfault, 2009-03-12) resurrected the support for an obscure
      (but useful) feature to read and overlay more than one tree into the index
      without the -m (merge) option.  But the fix was not enough.
      
      Exercising this feature exposes a longstanding bug in the code that primes
      the cache-tree in the index from the tree that was read.  The intention
      was that when we know that the index must exactly match the tree we just
      read, we prime the entire cache-tree with it.
      
      However, the logic to detect that case incorrectly triggered if you read
      two trees without -m.  This resulted in a corrupted cache-tree, and
      write-tree would have produced an incorrect tree object out of such an
      index.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8cc21ce7