Merge branch 'ak/cat-file-clean-up'
* ak/cat-file-clean-up: cat-file: use "type" and "size" from outer scope
This commit is contained in:
commit
67b5440d0d
@ -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) {
|
if (type_from_string(exp_type) == OBJ_BLOB) {
|
||||||
unsigned char blob_sha1[20];
|
unsigned char blob_sha1[20];
|
||||||
if (sha1_object_info(sha1, NULL) == OBJ_TAG) {
|
if (sha1_object_info(sha1, NULL) == OBJ_TAG) {
|
||||||
enum object_type type;
|
|
||||||
unsigned long size;
|
|
||||||
char *buffer = read_sha1_file(sha1, &type, &size);
|
char *buffer = read_sha1_file(sha1, &type, &size);
|
||||||
const char *target;
|
const char *target;
|
||||||
if (!skip_prefix(buffer, "object ", &target) ||
|
if (!skip_prefix(buffer, "object ", &target) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user