Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
register_ref(): rewrite to take an object_id argument
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 25 May 2015 18:38:31 +0000
(18:38 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 25 May 2015 19:19:28 +0000
(12:19 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a217dcb
)
diff --git
a/bisect.c
b/bisect.c
index 0848d914690808677119f6fad202293dc01b18b9..03d5cd9454207d0eb6fc87768e3dc432a5b921f5 100644
(file)
--- a/
bisect.c
+++ b/
bisect.c
@@
-400,16
+400,16
@@
struct commit_list *find_bisection(struct commit_list *list,
return best;
}
return best;
}
-static int register_ref(const char *refname, const
unsigned char *sha1
,
+static int register_ref(const char *refname, const
struct object_id *oid
,
int flags, void *cb_data)
{
if (!strcmp(refname, "bad")) {
current_bad_oid = xmalloc(sizeof(*current_bad_oid));
int flags, void *cb_data)
{
if (!strcmp(refname, "bad")) {
current_bad_oid = xmalloc(sizeof(*current_bad_oid));
-
hashcpy(current_bad_oid->hash, sha1
);
+
oidcpy(current_bad_oid, oid
);
} else if (starts_with(refname, "good-")) {
} else if (starts_with(refname, "good-")) {
- sha1_array_append(&good_revs,
sha1
);
+ sha1_array_append(&good_revs,
oid->hash
);
} else if (starts_with(refname, "skip-")) {
} else if (starts_with(refname, "skip-")) {
- sha1_array_append(&skipped_revs,
sha1
);
+ sha1_array_append(&skipped_revs,
oid->hash
);
}
return 0;
}
return 0;
@@
-417,10
+417,7
@@
static int register_ref(const char *refname, const unsigned char *sha1,
static int read_bisect_refs(void)
{
static int read_bisect_refs(void)
{
- struct each_ref_fn_sha1_adapter wrapped_register_ref =
- {register_ref, NULL};
-
- return for_each_ref_in("refs/bisect/", each_ref_fn_adapter, &wrapped_register_ref);
+ return for_each_ref_in("refs/bisect/", register_ref, NULL);
}
static void read_bisect_paths(struct argv_array *array)
}
static void read_bisect_paths(struct argv_array *array)