git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH/RFC 3/6] tag: copy parsed buffer unconditionnaly
Date: Sun, 22 Feb 2009 20:06:53 +0200	[thread overview]
Message-ID: <e29894ca0902221006v647322c2p5d0c78519ed28473@mail.gmail.com> (raw)

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
---
 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

                 reply	other threads:[~2009-02-22 18:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e29894ca0902221006v647322c2p5d0c78519ed28473@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).