Use blob_, commit_, tag_, and tree_type throughout.
This replaces occurences of "blob", "commit", "tag", and "tree",
where they're really used as type specifiers, which we already
have defined global constants for.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Peter Eriksen19 years agocommitted byJunio C Hamano
@ -1625,7 +1629,7 @@ int index_pipe(unsigned char *sha1, int fd, const char *type, int write_object)
@@ -1625,7 +1629,7 @@ int index_pipe(unsigned char *sha1, int fd, const char *type, int write_object)
return -1;
}
if (!type)
type = "blob";
type = blob_type;
if (write_object)
ret = write_sha1_file(buf, off, type, sha1);
else {
@ -1652,7 +1656,7 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, con
@@ -1652,7 +1656,7 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, con
return -1;
if (!type)
type = "blob";
type = blob_type;
if (write_object)
ret = write_sha1_file(buf, size, type, sha1);
else {
@ -1690,9 +1694,9 @@ int index_path(unsigned char *sha1, const char *path, struct stat *st, int write
@@ -1690,9 +1694,9 @@ int index_path(unsigned char *sha1, const char *path, struct stat *st, int write