aboutsummaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 14:03:58 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 14:03:58 -0700
commit73134b6d3f700bb9e6c66aa2f099de644c6b8d09 (patch)
tree5588456a03dc45bc5cc026a7e61ecb86bdd10c38 /read-cache.c
parent121481abf8d752ef871821d4ab9a3747595d86ae (diff)
downloadgit-73134b6d3f700bb9e6c66aa2f099de644c6b8d09.tar.gz
git-73134b6d3f700bb9e6c66aa2f099de644c6b8d09.tar.xz
Add "-R" flag to "diff-tree", so that it will recursively traverse a tree of trees
as it diffs them. This makes diff-tree usable again in the new world order.
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/read-cache.c b/read-cache.c
index ebace34d0..53da50065 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -63,7 +63,7 @@ char * sha1_to_hex(const unsigned char *sha1)
* careful about using it. Do a "strdup()" if you need to save the
* filename.
*/
-char *sha1_file_name(unsigned char *sha1)
+char *sha1_file_name(const unsigned char *sha1)
{
int i;
static char *name, *base;
@@ -99,7 +99,7 @@ int check_sha1_signature(unsigned char *sha1, void *map, unsigned long size)
return memcmp(sha1, real_sha1, 20) ? -1 : 0;
}
-void *map_sha1_file(unsigned char *sha1, unsigned long *size)
+void *map_sha1_file(const unsigned char *sha1, unsigned long *size)
{
char *filename = sha1_file_name(sha1);
int fd = open(filename, O_RDONLY);
@@ -158,7 +158,7 @@ void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned l
return buf;
}
-void * read_sha1_file(unsigned char *sha1, char *type, unsigned long *size)
+void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size)
{
unsigned long mapsize;
void *map, *buf;
@@ -208,7 +208,7 @@ int write_sha1_file(char *buf, unsigned len, unsigned char *returnsha1)
return 0;
}
-int write_sha1_buffer(unsigned char *sha1, void *buf, unsigned int size)
+int write_sha1_buffer(const unsigned char *sha1, void *buf, unsigned int size)
{
char *filename = sha1_file_name(sha1);
int fd;