revision: rename add_pending_sha1 to add_pending_oid
Rename this function and convert it to take a pointer to struct object_id. This is a prerequisite for converting get_reference, which is needed to convert parse_object. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1aa40df6b1
commit
a58a1b01ff
@ -1618,7 +1618,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
|
|||||||
init_revisions(&rev_info, NULL);
|
init_revisions(&rev_info, NULL);
|
||||||
rev_info.diffopt.output_format = DIFF_FORMAT_NAME_STATUS;
|
rev_info.diffopt.output_format = DIFF_FORMAT_NAME_STATUS;
|
||||||
diff_opt_parse(&rev_info.diffopt, &diff_filter_str, 1, rev_info.prefix);
|
diff_opt_parse(&rev_info.diffopt, &diff_filter_str, 1, rev_info.prefix);
|
||||||
add_pending_sha1(&rev_info, "HEAD", our_tree.hash, 0);
|
add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
|
||||||
diff_setup_done(&rev_info.diffopt);
|
diff_setup_done(&rev_info.diffopt);
|
||||||
run_diff_index(&rev_info, 1);
|
run_diff_index(&rev_info, 1);
|
||||||
}
|
}
|
||||||
|
@ -721,7 +721,7 @@ static int add_pending_uninteresting_ref(const char *refname,
|
|||||||
const struct object_id *oid,
|
const struct object_id *oid,
|
||||||
int flags, void *cb_data)
|
int flags, void *cb_data)
|
||||||
{
|
{
|
||||||
add_pending_sha1(cb_data, refname, oid->hash, UNINTERESTING);
|
add_pending_oid(cb_data, refname, oid, UNINTERESTING);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -807,7 +807,7 @@ static void orphaned_commit_warning(struct commit *old, struct commit *new)
|
|||||||
add_pending_object(&revs, object, oid_to_hex(&object->oid));
|
add_pending_object(&revs, object, oid_to_hex(&object->oid));
|
||||||
|
|
||||||
for_each_ref(add_pending_uninteresting_ref, &revs);
|
for_each_ref(add_pending_uninteresting_ref, &revs);
|
||||||
add_pending_sha1(&revs, "HEAD", new->object.oid.hash, UNINTERESTING);
|
add_pending_oid(&revs, "HEAD", &new->object.oid, UNINTERESTING);
|
||||||
|
|
||||||
refs = revs.pending;
|
refs = revs.pending;
|
||||||
revs.leak_pending = 1;
|
revs.leak_pending = 1;
|
||||||
|
@ -203,10 +203,10 @@ static struct object *get_reference(struct rev_info *revs, const char *name,
|
|||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_pending_sha1(struct rev_info *revs, const char *name,
|
void add_pending_oid(struct rev_info *revs, const char *name,
|
||||||
const unsigned char *sha1, unsigned int flags)
|
const struct object_id *oid, unsigned int flags)
|
||||||
{
|
{
|
||||||
struct object *object = get_reference(revs, name, sha1, flags);
|
struct object *object = get_reference(revs, name, oid->hash, flags);
|
||||||
add_pending_object(revs, object, name);
|
add_pending_object(revs, object, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1159,7 +1159,7 @@ static int handle_one_ref(const char *path, const struct object_id *oid,
|
|||||||
|
|
||||||
object = get_reference(cb->all_revs, path, oid->hash, cb->all_flags);
|
object = get_reference(cb->all_revs, path, oid->hash, cb->all_flags);
|
||||||
add_rev_cmdline(cb->all_revs, object, path, REV_CMD_REF, cb->all_flags);
|
add_rev_cmdline(cb->all_revs, object, path, REV_CMD_REF, cb->all_flags);
|
||||||
add_pending_sha1(cb->all_revs, path, oid->hash, cb->all_flags);
|
add_pending_oid(cb->all_revs, path, oid, cb->all_flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,8 +263,8 @@ extern void show_object_with_name(FILE *, struct object *, const char *);
|
|||||||
|
|
||||||
extern void add_pending_object(struct rev_info *revs,
|
extern void add_pending_object(struct rev_info *revs,
|
||||||
struct object *obj, const char *name);
|
struct object *obj, const char *name);
|
||||||
extern void add_pending_sha1(struct rev_info *revs,
|
extern void add_pending_oid(struct rev_info *revs,
|
||||||
const char *name, const unsigned char *sha1,
|
const char *name, const struct object_id *oid,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
extern void add_head_to_pending(struct rev_info *);
|
extern void add_head_to_pending(struct rev_info *);
|
||||||
|
Loading…
Reference in New Issue
Block a user