Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
contrib/hooks/post-receive-email: fix typo
[gitweb.git]
/
builtin-ls-files.c
diff --git
a/builtin-ls-files.c
b/builtin-ls-files.c
index 2e6f43bb9743d6938e9568d2467cff86901fa31f..b70da1863b221386a073ec8b7138cf0d91f52159 100644
(file)
--- a/
builtin-ls-files.c
+++ b/
builtin-ls-files.c
@@
-273,7
+273,8
@@
static void prune_cache(const char *prefix)
if (pos < 0)
pos = -pos-1;
- active_cache += pos;
+ memmove(active_cache, active_cache + pos,
+ (active_nr - pos) * sizeof(struct cache_entry *));
active_nr -= pos;
first = 0;
last = active_nr;