Skip to content

Commit 1b27c2f

Browse files
committed
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 <[email protected]>
1 parent 274ac00 commit 1b27c2f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sha1_name.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne
9393
last = num;
9494
while (first < last) {
9595
uint32_t mid = (first + last) / 2;
96-
const unsigned char *now;
96+
const unsigned char *current;
9797
int cmp;
9898

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);
101101
if (!cmp) {
102102
first = mid;
103103
break;
@@ -109,17 +109,17 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne
109109
last = mid;
110110
}
111111
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)) {
115115
next = nth_packed_object_sha1(p, first+1);
116116
if (!next|| !match_sha(len, match, next)) {
117117
/* unique within this pack */
118118
if (!found) {
119-
found_sha1 = now;
119+
found_sha1 = current;
120120
found++;
121121
}
122-
else if (hashcmp(found_sha1, now)) {
122+
else if (hashcmp(found_sha1, current)) {
123123
found = 2;
124124
break;
125125
}

0 commit comments

Comments
 (0)