summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a2b7a3b)
raw | patch | inline | side by side (parent: a2b7a3b)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Sat, 5 Feb 2011 10:52:20 +0000 (17:52 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Feb 2011 23:04:42 +0000 (15:04 -0800) |
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | patch | blob | history | |
commit.h | patch | blob | history | |
tag.c | patch | blob | history | |
tag.h | patch | blob | history |
diff --git a/commit.c b/commit.c
index 74d66018800d7a2a2b3a3365e87a23049690da6b..ac337c7d7dc1724fa918f9340816d3102edb10bd 100644 (file)
--- a/commit.c
+++ b/commit.c
return 0;
}
-int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
+int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long size)
{
- char *tail = buffer;
- char *bufptr = buffer;
+ const char *tail = buffer;
+ const char *bufptr = buffer;
unsigned char parent[20];
struct commit_list **pptr;
struct commit_graft *graft;
diff --git a/commit.h b/commit.h
index eb6c5af1f6b18546b3b3f1683142b15bb0ae9e34..659c87c3ee90c23064f617e3bcf3ace12e32ea04 100644 (file)
--- a/commit.h
+++ b/commit.h
int quiet);
struct commit *lookup_commit_reference_by_name(const char *name);
-int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);
+int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long size);
int parse_commit(struct commit *item);
/* Find beginning and length of commit subject. */
index f789744ccaf5d5fb6f63ba0911a869492affc162..ecf7c1e9ce889514e04765695298ef11f28edab6 100644 (file)
--- a/tag.c
+++ b/tag.c
return strtoul(dateptr, NULL, 10);
}
-int parse_tag_buffer(struct tag *item, void *data, unsigned long size)
+int parse_tag_buffer(struct tag *item, const void *data, unsigned long size)
{
unsigned char sha1[20];
char type[20];
index 85223700396f5ddb00c046a1a9fdb63c92aae40e..5ee88e6550cafa78b7e4acaa1285d5805974a037 100644 (file)
--- a/tag.h
+++ b/tag.h
};
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_buffer(struct tag *item, const void *data, unsigned long size);
extern int parse_tag(struct tag *item);
extern struct object *deref_tag(struct object *, const char *, int);
extern size_t parse_signature(const char *buf, unsigned long size);