summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 853563d)
raw | patch | inline | side by side (parent: 853563d)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Dec 2010 17:09:55 +0000 (09:09 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Dec 2010 18:02:13 +0000 (10:02 -0800) |
Make the parts a bit more readable before touching them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c | patch | blob | history |
diff --git a/unpack-trees.c b/unpack-trees.c
index d5a453079a02ff8b7a63a3453d07935e0807c005..aa585be1b01f21e3a94e3982b184cf4145e16c00 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
static int unpack_index_entry(struct cache_entry *ce,
struct unpack_trees_options *o)
{
- struct cache_entry *src[5] = { NULL };
+ struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, };
int ret;
src[0] = ce;
return ret;
}
-static int traverse_trees_recursive(int n, unsigned long dirmask, unsigned long df_conflicts, struct name_entry *names, struct traverse_info *info)
+static int traverse_trees_recursive(int n, unsigned long dirmask,
+ unsigned long df_conflicts,
+ struct name_entry *names,
+ struct traverse_info *info)
{
int i, ret, bottom;
struct tree_desc t[MAX_UNPACK_TREES];
if (!o->skip_sparse_checkout) {
int empty_worktree = 1;
- for (i = 0;i < o->result.cache_nr;i++) {
+ for (i = 0; i < o->result.cache_nr; i++) {
struct cache_entry *ce = o->result.cache[i];
if (apply_sparse_checkout(ce, o)) {
}
if (o->result.cache_nr && empty_worktree) {
+ /* dubious---why should this fail??? */
ret = unpack_failed(o, "Sparse checkout leaves no entry on working directory");
goto done;
}
*o->dst_index = o->result;
done:
- for (i = 0;i < el.nr;i++)
+ for (i = 0; i < el.nr; i++)
free(el.excludes[i]);
if (el.excludes)
free(el.excludes);