[PATCH/RFC 3/6] tag: copy parsed buffer unconditionnaly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marc-Andre Lureau <marcandre.lureau@xxxxxxxxx>
---
 tag.c |    3 +++
 tag.h |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tag.c b/tag.c
index eecc636..b53056c 100644
--- a/tag.c
+++ b/tag.c
@@ -82,6 +82,9 @@ int parse_tag_buffer(struct tag *item, void *data,
unsigned long size)
 	if (date)
 		item->date = strtoul(++date, NULL, 10);

+	item->buffer = xmemdupz(data, size);
+	item->size = size;
+
 	if (!strcmp(type, blob_type)) {
 		item->tagged = &lookup_blob(sha1)->object;
 	} else if (!strcmp(type, tree_type)) {
diff --git a/tag.h b/tag.h
index e6edfcf..d7a6846 100644
--- a/tag.h
+++ b/tag.h
@@ -11,6 +11,8 @@ struct tag {
 	char *tag;
 	char *signature;
 	unsigned long date;
+	char *buffer;
+	unsigned long size;
 };

 extern struct tag *lookup_tag(const unsigned char *sha1);
-- 
1.6.2.rc1.28.g05ef4.dirty
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux