Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
tree-diff: no need to pass match to skip_uninteresting()
author
Kirill Smelkov
<kirr@mns.spb.ru>
Mon, 3 Feb 2014 12:47:18 +0000
(16:47 +0400)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 24 Feb 2014 22:46:11 +0000
(14:46 -0800)
It is neither used there as input, nor the output written through it, is
used outside.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree-diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e197c2b
)
diff --git
a/tree-diff.c
b/tree-diff.c
index 5810b0042723be1cebfb92c14f154bba76e86cc8..a8c2aecd1d31587591ca68496a1a0d6b49bdbce5 100644
(file)
--- a/
tree-diff.c
+++ b/
tree-diff.c
@@
-109,13
+109,14
@@
static void show_entry(struct diff_options *opt, const char *prefix,
}
static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
}
static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
- struct diff_options *opt,
- enum interesting *match)
+ struct diff_options *opt)
{
{
+ enum interesting match;
+
while (t->size) {
while (t->size) {
-
*
match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
- if (
*
match) {
- if (
*
match == all_entries_not_interesting)
+ match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
+ if (match) {
+ if (match == all_entries_not_interesting)
t->size = 0;
break;
}
t->size = 0;
break;
}
@@
-128,8
+129,6
@@
int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
{
struct strbuf base;
int baselen = strlen(base_str);
{
struct strbuf base;
int baselen = strlen(base_str);
- enum interesting t1_match = entry_not_interesting;
- enum interesting t2_match = entry_not_interesting;
/* Enable recursion indefinitely */
opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE);
/* Enable recursion indefinitely */
opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE);
@@
-141,8
+140,8
@@
int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
if (diff_can_quit_early(opt))
break;
if (opt->pathspec.nr) {
if (diff_can_quit_early(opt))
break;
if (opt->pathspec.nr) {
- skip_uninteresting(t1, &base, opt
, &t1_match
);
- skip_uninteresting(t2, &base, opt
, &t2_match
);
+ skip_uninteresting(t1, &base, opt);
+ skip_uninteresting(t2, &base, opt);
}
if (!t1->size) {
if (!t2->size)
}
if (!t1->size) {
if (!t2->size)