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:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 21:59:24 +0400
committerJunio C Hamano <gitster@pobox.com>2014-07-22 21:59:25 +0400
commit10b944b37b11d6e0597541efdd1fa23c0eecbeff (patch)
tree2cbd3d48b1f08edee38c565984aaccdca325ef43 /builtin
parent9f2de9c121c60cba9e55db5263a7bceffcd8fe2d (diff)
parentfa96082617e07d988103854fb96c5e92b7587e72 (diff)
Merge branch 'jk/alloc-commit-id'
Make sure all in-core commit objects are assigned a unique number so that they can be annotated using the commit-slab API. * jk/alloc-commit-id: diff-tree: avoid lookup_unknown_object object_as_type: set commit index alloc: factor out commit index add object_as_type helper for casting objects parse_object_buffer: do not set object type move setting of object->type to alloc_* functions alloc: write out allocator definitions alloc.c: remove the alloc_raw_commit_node() function
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c1
-rw-r--r--builtin/diff-tree.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 32ce05f615..23212cbe87 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2287,7 +2287,6 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
commit = alloc_commit_node();
commit->object.parsed = 1;
commit->date = now;
- commit->object.type = OBJ_COMMIT;
parent_tail = &commit->parents;
if (!resolve_ref_unsafe("HEAD", head_sha1, 1, NULL))
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index ce0e019e0c..1c4ad6223e 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -68,9 +68,7 @@ static int diff_tree_stdin(char *line)
line[len-1] = 0;
if (get_sha1_hex(line, sha1))
return -1;
- obj = lookup_unknown_object(sha1);
- if (!obj || !obj->parsed)
- obj = parse_object(sha1);
+ obj = parse_object(sha1);
if (!obj)
return -1;
if (obj->type == OBJ_COMMIT)