From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH 2/2] Remove unnecessary found variable from describe.
Date: Thu, 25 Jan 2007 12:40:03 -0500 [thread overview]
Message-ID: <20070125174003.GB13276@spearce.org> (raw)
In-Reply-To: <2d9c5cd428a8962a64628a4e429263576bc46762.1169746766.git.spearce@spearce.org>
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>
---
builtin-describe.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/builtin-describe.c b/builtin-describe.c
index d8ff621..14c712a 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++;
--
1.5.0.rc2.g18af
parent reply other threads:[~2007-01-25 17:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <2d9c5cd428a8962a64628a4e429263576bc46762.1169746766.git.spearce@spearce.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070125174003.GB13276@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.