Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sha1_name.c: rename "now" to "current"
author
Junio C Hamano
<gitster@pobox.com>
Mon, 18 Jun 2012 18:50:36 +0000
(11:50 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 3 Jul 2012 17:24:15 +0000
(10:24 -0700)
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>
sha1_name.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
274ac00
)
diff --git
a/sha1_name.c
b/sha1_name.c
index 9bb657deb3dc3047a4a12713ff2717a7e60ab9b5..c5c4591f98989e48b13f2625a9f09f09e546a2f8 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-93,11
+93,11
@@
static int find_short_packed_object(int len, const unsigned char *match, unsigne
last = num;
while (first < last) {
uint32_t mid = (first + last) / 2;
last = num;
while (first < last) {
uint32_t mid = (first + last) / 2;
- const unsigned char *
now
;
+ const unsigned char *
current
;
int cmp;
int cmp;
-
now
= nth_packed_object_sha1(p, mid);
- cmp = hashcmp(match,
now
);
+
current
= nth_packed_object_sha1(p, mid);
+ cmp = hashcmp(match,
current
);
if (!cmp) {
first = mid;
break;
if (!cmp) {
first = mid;
break;
@@
-109,17
+109,17
@@
static int find_short_packed_object(int len, const unsigned char *match, unsigne
last = mid;
}
if (first < num) {
last = mid;
}
if (first < num) {
- const unsigned char *
now
, *next;
-
now
= nth_packed_object_sha1(p, first);
- if (match_sha(len, match,
now
)) {
+ const unsigned char *
current
, *next;
+
current
= nth_packed_object_sha1(p, first);
+ if (match_sha(len, match,
current
)) {
next = nth_packed_object_sha1(p, first+1);
if (!next|| !match_sha(len, match, next)) {
/* unique within this pack */
if (!found) {
next = nth_packed_object_sha1(p, first+1);
if (!next|| !match_sha(len, match, next)) {
/* unique within this pack */
if (!found) {
- found_sha1 =
now
;
+ found_sha1 =
current
;
found++;
}
found++;
}
- else if (hashcmp(found_sha1,
now
)) {
+ else if (hashcmp(found_sha1,
current
)) {
found = 2;
break;
}
found = 2;
break;
}