Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit.c4
-rw-r--r--commit.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index b4e000e9c2..abbf155da9 100644
--- a/commit.c
+++ b/commit.c
@@ -103,6 +103,10 @@ int parse_commit(struct commit *item)
sha1_to_hex(item->object.sha1));
}
ret = parse_commit_buffer(item, buffer, size);
+ if (!ret) {
+ item->buffer = buffer;
+ return 0;
+ }
free(buffer);
return ret;
}
diff --git a/commit.h b/commit.h
index 620e936bbc..0bb8779ca7 100644
--- a/commit.h
+++ b/commit.h
@@ -14,6 +14,7 @@ struct commit {
unsigned long date;
struct commit_list *parents;
struct tree *tree;
+ const char *buffer;
};
extern const char *commit_type;