Re: [PATCH 1/3] traverse_trees(): allow pruning with pathspec
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Oct 9, 2011, 15:39 UTC
- Message-ID
- <4E91C031.9030205@alum.mit.edu>
- In-Reply-To
- <1314653603-7533-2-git-send-email-gitster@pobox.com>
On 08/29/2011 11:33 PM, Junio C Hamano wrote:
Show 19 quoted lines
> diff --git a/tree-walk.c b/tree-walk.c
> index 33f749e..808bb55 100644
> --- a/tree-walk.c
> +++ b/tree-walk.c
> [...]
> @@ -376,16 +396,22 @@ int traverse_trees(int n, struct tree_desc *t, struct traverse_info *info)
> mask |= 1ul << i;
> if (S_ISDIR(entry[i].mode))
> dirmask |= 1ul << i;
> + e = &entry[i];
> }
> if (!mask)
> break;
> - ret = info->fn(n, mask, dirmask, entry, info);
> - if (ret < 0) {
> - error = ret;
> - if (!info->show_all_errors)
> - break;
> + interesting = prune_traversal(e, info, &base, interesting);According to gcc 4.2.4 (though, strangely, not gcc 4.4.3):
tree-walk.c: In function ‘traverse_trees’: tree-walk.c:347: warning: ‘e’ may be used uninitialized in this function
Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/