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

[PATCH] cat-file: remove definition of already defined variables

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Jan 10, 2015, 18:13 UTC
Message-ID
<1420913603-794-1-git-send-email-kuleshovmail@gmail.com>

'enum object_type type' and 'unsigned long size' are already defined at the top of cat_one_file routine

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 builtin/cat-file.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 750b5a2..31b133b 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -75,8 +75,6 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
 		if (type_from_string(exp_type) == OBJ_BLOB) {
 			unsigned char blob_sha1[20];
 			if (sha1_object_info(sha1, NULL) == OBJ_TAG) {
-				enum object_type type;
-				unsigned long size;
 				char *buffer = read_sha1_file(sha1, &type, &size);
 				const char *target;
 				if (!skip_prefix(buffer, "object ", &target) ||
-- 
2.2.1.532.g168b885.dirty
Next: Junio C Hamano
Message 1 of 2 in “cat-file: remove definition of already defined variables”
  1. cat-file: remove definition of already defined variablesAlexander Kuleshov, Jan 10, 2015
  2. Junio C HamanoJan 12, 2015

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.