Merge branch 'ak/cat-file-clean-up'
authorJunio C Hamano <gitster@pobox.com>
Thu, 22 Jan 2015 21:46:38 +0000 (13:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Jan 2015 21:46:38 +0000 (13:46 -0800)
* ak/cat-file-clean-up:
cat-file: use "type" and "size" from outer scope

1  2 
builtin/cat-file.c
diff --combined builtin/cat-file.c
index 750b5a24b4e7c1781adde09ac2717f7cbf02b872,5e24e811ee93d33180d4e3a19a21989b31169c56..31b133b357f34e9bc0a63dec5ce2dbceba43e765
@@@ -4,8 -4,12 +4,8 @@@
   * Copyright (C) Linus Torvalds, 2005
   */
  #include "cache.h"
 -#include "exec_cmd.h"
 -#include "tag.h"
 -#include "tree.h"
  #include "builtin.h"
  #include "parse-options.h"
 -#include "diff.h"
  #include "userdiff.h"
  #include "streaming.h"
  
@@@ -75,8 -79,6 +75,6 @@@ static int cat_one_file(int opt, const 
                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) ||