From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] tag: convert gpg_verify_tag to use struct object_id
Date: Thu, 13 Jul 2017 12:02:25 -0700 [thread overview]
Message-ID: <xmqqzic8w472.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170713004415.5051-2-sbeller@google.com> (Stefan Beller's message of "Wed, 12 Jul 2017 17:44:15 -0700")
Stefan Beller <sbeller@google.com> writes:
> if (fmt_pretty)
> - pretty_print_ref(name, sha1, fmt_pretty);
> + pretty_print_ref(name, oid.hash, fmt_pretty);
The next step would be to have pretty_print_ref() to take an oid; as
there are only two callers to it, both of which pass oid->hash to it,
that should be a small and conflict-free conversion.
>
> - type = sha1_object_info(sha1, NULL);
> + type = sha1_object_info(oid->hash, NULL);
sha1_object_info() has a handful of callers that do not pass the
pointer to the hash field in an existing oid object, but it does not
look too bad as a candidate for conversion.
> if (!buf)
> return error("%s: unable to read file.",
> name_to_report ?
> name_to_report :
> - find_unique_abbrev(sha1, DEFAULT_ABBREV));
> + find_unique_abbrev(oid->hash, DEFAULT_ABBREV));
So does find_unique_abbrev().
Overall both patches look good. Thanks.
next prev parent reply other threads:[~2017-07-13 19:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 0:44 [PATCH 1/2] commit: convert lookup_commit_graft to struct object_id Stefan Beller
2017-07-13 0:44 ` [PATCH 2/2] tag: convert gpg_verify_tag to use " Stefan Beller
2017-07-13 19:02 ` Junio C Hamano [this message]
2017-07-13 20:52 ` Junio C Hamano
2017-07-13 21:00 ` Stefan Beller
2017-07-13 21:23 ` Junio C Hamano
2017-07-13 21:49 ` Stefan Beller
2017-07-13 23:45 ` brian m. carlson
2017-07-13 2:26 ` [PATCH 1/2] commit: convert lookup_commit_graft to " brian m. carlson
2017-07-13 18:54 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzic8w472.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).