diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-01-25 12:40:03 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-26 00:08:48 -0800 |
commit | 8a8169c0398ff9996216381d7688c2ba2d007050 (patch) | |
tree | 074af9d87957c0a50bf6542e3532e8c77d6ac2d6 /builtin-describe.c | |
parent | 007e2ba65902b484fc65a313e54594a009841740 (diff) | |
download | git-8a8169c0398ff9996216381d7688c2ba2d007050.tar.gz |
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>
Diffstat (limited to 'builtin-describe.c')
-rw-r--r-- | builtin-describe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-describe.c b/builtin-describe.c index e7b8f95c81..4921eee9e2 100644 --- a/builtin-describe.c +++ b/builtin-describe.c @@ -101,7 +101,6 @@ static void describe(const char *arg, int last_one) struct possible_tag all_matches[MAX_TAGS]; unsigned int match_cnt = 0, annotated_cnt = 0, cur_match; unsigned long seen_commits = 0; - int found = 0; if (get_sha1(arg, sha1)) die("Not a valid object name %s", arg); @@ -137,7 +136,7 @@ static void describe(const char *arg, int last_one) t->name = n; t->depth = seen_commits - 1; t->flag_within = 1u << match_cnt; - t->found_order = found++; + t->found_order = match_cnt; c->object.flags |= t->flag_within; if (n->prio == 2) annotated_cnt++; |