This behaviour causes a different parent list depending on
the already loaded objects, if the parent points contains
a non commit sha1.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
---
This will hide such an error from fsck (as the parent is not
returned) and make it only print a message to stderr.
commit.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/commit.c b/commit.c
index 8b8fb04..116afb7 100644
--- a/commit.c
+++ b/commit.c
@@ -275,7 +275,8 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
if (new_parent) {
pptr = &commit_list_insert(new_parent, pptr)->next;
n_refs++;
- }
+ } else
+ return error("bad parents in commit %s", sha1_to_hex(item->object.sha1));
}
if (graft) {
int i;
@@ -283,7 +284,7 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
for (i = 0; i < graft->nr_parent; i++) {
new_parent = lookup_commit(graft->parent[i]);
if (!new_parent)
- continue;
+ return error("bad graft in commit %s", sha1_to_hex(item->object.sha1));
pptr = &commit_list_insert(new_parent, pptr)->next;
n_refs++;
}
--
1.5.4.1.g3a858
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Alan Cox | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Adrian Bunk | Re: LSM conversion to static interface |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Winkler, Tomas | RE: iwlwifi: fix build bug in "iwlwifi: fix LED stall" |
