sha1_name.c: rename "now" to "current"
This variable points at the element we are currently looking at, and does not have anything to do with the current time which the name "now" implies. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jun 18, 2012 at 11:50 UTC
1b27c2f01af398706acf554794644daaf6bc8835
1 file changed
+8
-8
sha1_name.c
+8
-8
@@ -93,11 +93,11 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne
93
last = num;
94
while (first < last) {
95
uint32_t mid = (first + last) / 2;
96
- const unsigned char *now;
96
+ const unsigned char *current;
97
int cmp;
98
99
- now = nth_packed_object_sha1(p, mid);
100
- cmp = hashcmp(match, now);
99
+ current = nth_packed_object_sha1(p, mid);
100
+ cmp = hashcmp(match, current);
101
if (!cmp) {
102
first = mid;
103
break;
@@ -109,17 +109,17 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne
109
last = mid;
110
}
111
if (first < num) {
112
- const unsigned char *now, *next;
113
- now = nth_packed_object_sha1(p, first);
114
- if (match_sha(len, match, now)) {
112
+ const unsigned char *current, *next;
113
+ current = nth_packed_object_sha1(p, first);
114
+ if (match_sha(len, match, current)) {
115
next = nth_packed_object_sha1(p, first+1);
116
if (!next|| !match_sha(len, match, next)) {
117
/* unique within this pack */
118
if (!found) {
119
- found_sha1 = now;
119
+ found_sha1 = current;
120
found++;
121
}
122
- else if (hashcmp(found_sha1, now)) {
122
+ else if (hashcmp(found_sha1, current)) {
123
found = 2;
124
break;
125
}