<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,7 +4,7 @@
 
 const char *blob_type = &quot;blob&quot;;
 
-struct blob *lookup_blob(unsigned char *sha1)
+struct blob *lookup_blob(const unsigned char *sha1)
 {
 	struct object *obj = lookup_object(sha1);
 	if (!obj) {</diff>
      <filename>blob.c</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ struct blob {
 	struct object object;
 };
 
-struct blob *lookup_blob(unsigned char *sha1);
+struct blob *lookup_blob(const unsigned char *sha1);
 
 int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);
 </diff>
      <filename>blob.h</filename>
    </modified>
    <modified>
      <diff>@@ -167,7 +167,7 @@ extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, uns
 extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size);
 extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
 
-extern int check_sha1_signature(unsigned char *sha1, void *buf, unsigned long size, const char *type);
+extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);
 
 /* Read a tree into the cache */
 extern int read_tree(void *buffer, unsigned long size, int stage);</diff>
      <filename>cache.h</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
 
 const char *commit_type = &quot;commit&quot;;
 
-static struct commit *check_commit(struct object *obj, unsigned char *sha1)
+static struct commit *check_commit(struct object *obj, const unsigned char *sha1)
 {
 	if (obj-&gt;type != commit_type) {
 		error(&quot;Object %s is a %s, not a commit&quot;, 
@@ -15,7 +15,7 @@ static struct commit *check_commit(struct object *obj, unsigned char *sha1)
 	return (struct commit *) obj;
 }
 
-struct commit *lookup_commit_reference(unsigned char *sha1)
+struct commit *lookup_commit_reference(const unsigned char *sha1)
 {
 	struct object *obj = parse_object(sha1);
 
@@ -26,7 +26,7 @@ struct commit *lookup_commit_reference(unsigned char *sha1)
 	return check_commit(obj, sha1);
 }
 
-struct commit *lookup_commit(unsigned char *sha1)
+struct commit *lookup_commit(const unsigned char *sha1)
 {
 	struct object *obj = lookup_object(sha1);
 	if (!obj) {</diff>
      <filename>commit.c</filename>
    </modified>
    <modified>
      <diff>@@ -19,8 +19,8 @@ struct commit {
 
 extern const char *commit_type;
 
-struct commit *lookup_commit(unsigned char *sha1);
-struct commit *lookup_commit_reference(unsigned char *sha1);
+struct commit *lookup_commit(const unsigned char *sha1);
+struct commit *lookup_commit_reference(const unsigned char *sha1);
 
 int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);
 </diff>
      <filename>commit.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ struct delta {
 	} u;
 };
 
-struct delta *lookup_delta(unsigned char *sha1)
+struct delta *lookup_delta(const unsigned char *sha1)
 {
 	struct object *obj = lookup_object(sha1);
 	if (!obj) {</diff>
      <filename>delta.c</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ extern void *patch_delta(void *src_buf, unsigned long src_size,
 /* handling of delta objects */
 struct delta;
 struct object_list;
-extern struct delta *lookup_delta(unsigned char *sha1);
+extern struct delta *lookup_delta(const unsigned char *sha1);
 extern int parse_delta_buffer(struct delta *item, void *buffer, unsigned long size);
 extern int parse_delta(struct delta *item, unsigned char sha1);
 extern int process_deltas(void *src, unsigned long src_size,</diff>
      <filename>delta.h</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ struct object **objs;
 int nr_objs;
 static int obj_allocs;
 
-static int find_object(unsigned char *sha1)
+static int find_object(const unsigned char *sha1)
 {
 	int first = 0, last = nr_objs;
 
@@ -31,7 +31,7 @@ static int find_object(unsigned char *sha1)
         return -first-1;
 }
 
-struct object *lookup_object(unsigned char *sha1)
+struct object *lookup_object(const unsigned char *sha1)
 {
 	int pos = find_object(sha1);
 	if (pos &gt;= 0)
@@ -39,7 +39,7 @@ struct object *lookup_object(unsigned char *sha1)
 	return NULL;
 }
 
-void created_object(unsigned char *sha1, struct object *obj)
+void created_object(const unsigned char *sha1, struct object *obj)
 {
 	int pos = find_object(sha1);
 
@@ -98,7 +98,7 @@ void mark_reachable(struct object *obj, unsigned int mask)
 	}
 }
 
-struct object *parse_object(unsigned char *sha1)
+struct object *parse_object(const unsigned char *sha1)
 {
 	unsigned long mapsize;
 	void *map = map_sha1_file(sha1, &amp;mapsize);</diff>
      <filename>object.c</filename>
    </modified>
    <modified>
      <diff>@@ -21,12 +21,12 @@ struct object {
 extern int nr_objs;
 extern struct object **objs;
 
-struct object *lookup_object(unsigned char *sha1);
+struct object *lookup_object(const unsigned char *sha1);
 
-void created_object(unsigned char *sha1, struct object *obj);
+void created_object(const unsigned char *sha1, struct object *obj);
 
 /** Returns the object, having parsed it to find out what it is. **/
-struct object *parse_object(unsigned char *sha1);
+struct object *parse_object(const unsigned char *sha1);
 
 void add_ref(struct object *refer, struct object *target);
 </diff>
      <filename>object.h</filename>
    </modified>
    <modified>
      <diff>@@ -266,7 +266,7 @@ static char *find_sha1_file(const unsigned char *sha1, struct stat *st)
 	return NULL;
 }
 
-int check_sha1_signature(unsigned char *sha1, void *map, unsigned long size, const char *type)
+int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long size, const char *type)
 {
 	char header[100];
 	unsigned char real_sha1[20];</diff>
      <filename>sha1_file.c</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 
 const char *tag_type = &quot;tag&quot;;
 
-struct tag *lookup_tag(unsigned char *sha1)
+struct tag *lookup_tag(const unsigned char *sha1)
 {
         struct object *obj = lookup_object(sha1);
         if (!obj) {</diff>
      <filename>tag.c</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ struct tag {
 	char *signature; /* not actually implemented */
 };
 
-extern struct tag *lookup_tag(unsigned char *sha1);
+extern struct tag *lookup_tag(const unsigned char *sha1);
 extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size);
 extern int parse_tag(struct tag *item);
 </diff>
      <filename>tag.h</filename>
    </modified>
    <modified>
      <diff>@@ -73,7 +73,7 @@ int read_tree(void *buffer, unsigned long size, int stage)
 	return read_tree_recursive(buffer, size, &quot;&quot;, 0, stage);
 }
 
-struct tree *lookup_tree(unsigned char *sha1)
+struct tree *lookup_tree(const unsigned char *sha1)
 {
 	struct object *obj = lookup_object(sha1);
 	if (!obj) {</diff>
      <filename>tree.c</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ struct tree {
 	struct tree_entry_list *entries;
 };
 
-struct tree *lookup_tree(unsigned char *sha1);
+struct tree *lookup_tree(const unsigned char *sha1);
 
 int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size);
 </diff>
      <filename>tree.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e0f0e891c1742c6ae22dbc648a1000ad8655ff34</id>
    </parent>
  </parents>
  <author>
    <name>Jason McMullan</name>
    <email>jason.mcmullan@timesys.com</email>
  </author>
  <url>http://github.com/schacon/git-source/commit/5d6ccf5ce7f28e576a87f6c6f4f99fae90e06db6</url>
  <id>5d6ccf5ce7f28e576a87f6c6f4f99fae90e06db6</id>
  <committed-date>2005-06-08T13:04:53-07:00</committed-date>
  <authored-date>2005-06-03T08:05:39-07:00</authored-date>
  <message>[PATCH] Anal retentive 'const unsigned char *sha1'

Make 'sha1' parameters const where possible

Signed-off-by: Jason McMullan &lt;jason.mcmullan@timesys.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;</message>
  <tree>73b86e1f4c11ec21f72f6ded1af70ca302a47837</tree>
  <committer>
    <name>Linus Torvalds</name>
    <email>torvalds@ppc970.osdl.org</email>
  </committer>
</commit>
