git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 09/13] builtin/verify-tag: convert to struct object_id

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 13, 2017, 23:49 UTC
Message-ID
<20170713234930.949612-10-sandals@crustytoothpaste.net>
In-Reply-To
<20170713234930.949612-1-sandals@crustytoothpaste.net>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 builtin/verify-tag.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index f9a5f7535a..30e4c826ed 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -56,20 +56,20 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
 	}
 
 	while (i < argc) {
-		unsigned char sha1[20];
+		struct object_id oid;
 		const char *name = argv[i++];
-		if (get_sha1(name, sha1)) {
+		if (get_oid(name, &oid)) {
 			had_error = !!error("tag '%s' not found.", name);
 			continue;
 		}
 
-		if (gpg_verify_tag(sha1, name, flags)) {
+		if (gpg_verify_tag(oid.hash, name, flags)) {
 			had_error = 1;
 			continue;
 		}
 
 		if (fmt_pretty)
-			pretty_print_ref(name, sha1, fmt_pretty);
+			pretty_print_ref(name, oid.hash, fmt_pretty);
 	}
 	return had_error;
 }
Previous: brian m. carlsonNext: brian m. carlson
Message 8 of 15 in “object_id part 9”
  1. 00/13 object_id part 9brian m. carlson, Jul 13, 2017
  2. 01/13 builtin/fsck: convert remaining caller of get_sha1 to object_idbrian m. carlson, Jul 13, 2017
  3. 02/13 builtin/merge-tree: convert remaining caller of get_sha1 to object_idbrian m. carlson, Jul 13, 2017
  4. 10/13 Convert remaining callers of get_sha1 to get_oid.brian m. carlson, Jul 13, 2017
  5. 05/13 sequencer: convert to struct object_idbrian m. carlson, Jul 13, 2017
  6. 07/13 bisect: convert bisect_checkout to struct object_idbrian m. carlson, Jul 13, 2017
  7. 11/13 sha1_name: convert get_sha1* to get_oid*brian m. carlson, Jul 13, 2017
  8. 09/13 builtin/verify-tag: convert to struct object_idbrian m. carlson, Jul 13, 2017
  9. 06/13 builtin/update_ref: convert to struct object_idbrian m. carlson, Jul 13, 2017
  10. 08/13 builtin/unpack-file: convert to struct object_idbrian m. carlson, Jul 13, 2017
  11. 03/13 submodule: convert submodule config lookup to use object_idbrian m. carlson, Jul 13, 2017
  12. 04/13 remote: convert struct push_cas to struct object_idbrian m. carlson, Jul 13, 2017
  13. 12/13 sha1_name: convert GET_SHA1* flags to GET_OID*brian m. carlson, Jul 13, 2017
  14. 13/13 sha1_name: convert uses of 40 to GIT_SHA1_HEXSZbrian m. carlson, Jul 13, 2017
  15. Brandon WilliamsJul 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.