Remove unnecessary found variable from describe.
Junio added the found variable to enforce commit date order when two tags have the same distance from the requested commit. Except it is unnecessary as match_cnt is already used to record how many possible tags have been identified thus far. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Jan 25, 2007 at 12:40 UTC
8a8169c0398ff9996216381d7688c2ba2d007050
1 file changed
+1
-2
builtin-describe.c
+1
-2
@@ -101,7 +101,6 @@ static void describe(const char *arg, int last_one)
101
struct possible_tag all_matches[MAX_TAGS];
102
unsigned int match_cnt = 0, annotated_cnt = 0, cur_match;
103
unsigned long seen_commits = 0;
104
- int found = 0;
104
105
if (get_sha1(arg, sha1))
106
die("Not a valid object name %s", arg);
@@ -137,7 +136,7 @@ static void describe(const char *arg, int last_one)
136
t->name = n;
137
t->depth = seen_commits - 1;
138
t->flag_within = 1u << match_cnt;
140
- t->found_order = found++;
139
+ t->found_order = match_cnt;
140
c->object.flags |= t->flag_within;
141
if (n->prio == 2)
142
annotated_cnt++;