summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcbc0d8)
raw | patch | inline | side by side (parent: fcbc0d8)
author | Thiago Farina <tfransosi@gmail.com> | |
Sun, 19 Dec 2010 11:56:25 +0000 (09:56 -0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 19 Dec 2010 18:44:06 +0000 (10:44 -0800) |
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rm.c | patch | blob | history |
diff --git a/builtin/rm.c b/builtin/rm.c
index c7b7bb37a2378aaeeddbbdfacd0f0a62337ec152..ff491d77612ffb3c906c5e1ffa232f4410e4b661 100644 (file)
--- a/builtin/rm.c
+++ b/builtin/rm.c
const char **name;
} list;
-static void add_list(const char *name)
-{
- if (list.nr >= list.alloc) {
- list.alloc = alloc_nr(list.alloc);
- list.name = xrealloc(list.name, list.alloc * sizeof(const char *));
- }
- list.name[list.nr++] = name;
-}
-
static int check_local_mod(unsigned char *head, int index_only)
{
/*
struct cache_entry *ce = active_cache[i];
if (!match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen))
continue;
- add_list(ce->name);
+ ALLOC_GROW(list.name, list.nr + 1, list.alloc);
+ list.name[list.nr++] = ce->name;
}
if (pathspec) {