{"thread":{"id":"6528","subject":"[PATCH 2/2] Remove unnecessary found variable from describe.","startedAt":"2007-01-25T17:40:03Z","lastAt":"2007-01-25T17:40:03Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"32629","messageId":"20070125174003.GB13276@spearce.org","threadId":"6528","inReplyTo":"2d9c5cd428a8962a64628a4e429263576bc46762.1169746766.git.spearce@spearce.org","subject":"[PATCH 2/2] Remove unnecessary found variable from describe.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-01-25T17:40:03Z","receivedAt":"2007-01-25T17:40:03Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio added the found variable to enforce commit date order when two\ntags have the same distance from the requested commit.  Except it is\nunnecessary as match_cnt is already used to record how many possible\ntags have been identified thus far.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n builtin-describe.c |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-describe.c b/builtin-describe.c\nindex d8ff621..14c712a 100644\n--- a/builtin-describe.c\n+++ b/builtin-describe.c\n@@ -101,7 +101,6 @@ static void describe(const char *arg, int last_one)\n \tstruct possible_tag all_matches[MAX_TAGS];\n \tunsigned int match_cnt = 0, annotated_cnt = 0, cur_match;\n \tunsigned long seen_commits = 0;\n-\tint found = 0;\n \n \tif (get_sha1(arg, sha1))\n \t\tdie(\"Not a valid object name %s\", arg);\n@@ -137,7 +136,7 @@ static void describe(const char *arg, int last_one)\n \t\t\t\tt->name = n;\n \t\t\t\tt->depth = seen_commits - 1;\n \t\t\t\tt->flag_within = 1u << match_cnt;\n-\t\t\t\tt->found_order = found++;\n+\t\t\t\tt->found_order = match_cnt;\n \t\t\t\tc->object.flags |= t->flag_within;\n \t\t\t\tif (n->prio == 2)\n \t\t\t\t\tannotated_cnt++;\n-- \n1.5.0.rc2.g18af\n"}]}