summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d633c88)
raw | patch | inline | side by side (parent: d633c88)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Sat, 7 Jun 2008 20:38:37 +0000 (22:38 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Jun 2008 20:46:37 +0000 (13:46 -0700) |
The n_refs variable is no longer really used in this function, so there
is no reason to keep it.
It was introduced in 27dedf0c and the code that really used it was
removed in 7914053.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
is no reason to keep it.
It was introduced in 27dedf0c and the code that really used it was
removed in 7914053.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index 94d5b3d2618d335585084170ef6a3a8e67f34c62..e2d8624d9c19adde87ae521361f4ccd8260c06a0 100644 (file)
--- a/commit.c
+++ b/commit.c
unsigned char parent[20];
struct commit_list **pptr;
struct commit_graft *graft;
- unsigned n_refs = 0;
if (item->object.parsed)
return 0;
return error("bad tree pointer in commit %s",
sha1_to_hex(item->object.sha1));
item->tree = lookup_tree(parent);
- if (item->tree)
- n_refs++;
bufptr += 46; /* "tree " + "hex sha1" + "\n" */
pptr = &item->parents;
if (graft)
continue;
new_parent = lookup_commit(parent);
- if (new_parent) {
+ if (new_parent)
pptr = &commit_list_insert(new_parent, pptr)->next;
- n_refs++;
- }
}
if (graft) {
int i;
if (!new_parent)
continue;
pptr = &commit_list_insert(new_parent, pptr)->next;
- n_refs++;
}
}
item->date = parse_commit_date(bufptr, tail);