Skip to content

Speeding up "git status" and "git diff --cached"

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5write-tree --ignore-cache-treebuiltin-write-tree.c cache-tree.c cache-tree.h+22 -70 replies
2/5cache-tree.c::cache_tree_find(): simplify inernal APIcache-tree.c+2 -00 replies
3/5t4007: modernize the stylet/t4007-rename-3.sh+32 -370 replies
4/5Optimize "diff-index --cached" using cache-treecache-tree.c cache-tree.h diff-lib.c +2 more+55 -00 replies
5/5Avoid "diff-index --cached" optimization under --find-copies-harderdiff-lib.c t/t4007-rename-3.sh+8 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Speeding up "git status" and "git diff --cached"

Here is a refined version of an earlier patch series to use cache-tree information to optimize comparison between the index with an existing commit.

Recently there was a discussion to auto-commit any change to the index that are going to be discarded to some kind of "trash" branch; I am not personally interested in writing a patch to do so, but this will also help such a feature by making it cheaper to see if there are differences worth saving.

Junio C Hamano (5):
write-tree --ignore-cache-tree cache-tree.c::cache_tree_find(): simplify inernal API
t4007: modernize the style
Optimize "diff-index --cached" using cache-tree
Avoid "diff-index --cached" optimization under --find-copies-harder

 builtin-write-tree.c |   12 ++++++--
 cache-tree.c         |   44 +++++++++++++++++++++++++++--
 cache-tree.h         |   10 ++++++-
 diff-lib.c           |    3 ++
 t/t4007-rename-3.sh  |   74 +++++++++++++++++++++++++-------------------------
 unpack-trees.c       |   17 +++++++++++
 unpack-trees.h       |    1 +
 7 files changed, 117 insertions(+), 44 deletions(-)