On 10/01, brian m. carlson wrote:
> Convert the callers and internals, including struct read_ref_at_cb, of
> read_ref_at to use struct object_id.
>
> Signed-off-by: brian m. carlson <[email protected]>
> ---
> builtin/show-branch.c | 5 ++---
> refs.c | 34 +++++++++++++++++-----------------
> refs.h | 2 +-
> sha1_name.c | 3 +--
> 4 files changed, 21 insertions(+), 23 deletions(-)
>
> diff --git a/builtin/show-branch.c b/builtin/show-branch.c
> index 722a7f4bec..8ef8ad10c5 100644
> --- a/builtin/show-branch.c
> +++ b/builtin/show-branch.c
> @@ -731,7 +731,7 @@ int cmd_show_branch(int ac, const char **av, const char
> *prefix)
> /* Ah, that is a date spec... */
> timestamp_t at;
> at = approxidate(reflog_base);
> - read_ref_at(ref, flags, at, -1, oid.hash, NULL,
> + read_ref_at(ref, flags, at, -1, &oid, NULL,
> NULL, NULL, &base);
> }
> }
> @@ -743,8 +743,7 @@ int cmd_show_branch(int ac, const char **av, const char
> *prefix)
> timestamp_t timestamp;
> int tz;
>
> - if (read_ref_at(ref, flags, 0, base+i, oid.hash,
> &logmsg,
> - ×tamp, &tz, NULL)) {
> + if (read_ref_at(ref, flags, 0, base + i, &oid, &logmsg,
> ×tamp, &tz, NULL)) {
This line maybe got too long?
> diff --git a/sha1_name.c b/sha1_name.c
> index 7de12743f3..f0ec3f0454 100644
> --- a/sha1_name.c
> +++ b/sha1_name.c
> @@ -697,8 +697,7 @@ static int get_oid_basic(const char *str, int len, struct
> object_id *oid,
> return -1;
> }
> }
> - if (read_ref_at(real_ref, flags, at_time, nth, oid->hash, NULL,
> - &co_time, &co_tz, &co_cnt)) {
> + if (read_ref_at(real_ref, flags, at_time, nth, oid, NULL,
> &co_time, &co_tz, &co_cnt)) {
> if (!len) {
> if (starts_with(real_ref, "refs/heads/")) {
> str = real_ref + 11;
This one too.
--
Brandon Williams