@@ -41,7 +41,8 @@ static void rev_list_push(struct commit *commit, int mark)
41
41
commit -> object .flags |= mark ;
42
42
43
43
if (!(commit -> object .parsed ))
44
- parse_commit (commit );
44
+ if (parse_commit (commit ))
45
+ return ;
45
46
46
47
insert_by_date (commit , & rev_list );
47
48
@@ -83,7 +84,8 @@ static void mark_common(struct commit *commit,
83
84
if (!ancestors_only && !(o -> flags & POPPED ))
84
85
non_common_revs -- ;
85
86
if (!o -> parsed && !dont_parse )
86
- parse_commit (commit );
87
+ if (parse_commit (commit ))
88
+ return ;
87
89
88
90
for (parents = commit -> parents ;
89
91
parents ;
@@ -103,20 +105,20 @@ static const unsigned char* get_rev(void)
103
105
104
106
while (commit == NULL ) {
105
107
unsigned int mark ;
106
- struct commit_list * parents ;
108
+ struct commit_list * parents = NULL ;
107
109
108
110
if (rev_list == NULL || non_common_revs == 0 )
109
111
return NULL ;
110
112
111
113
commit = rev_list -> item ;
112
114
if (!(commit -> object .parsed ))
113
- parse_commit (commit );
115
+ if (!parse_commit (commit ))
116
+ parents = commit -> parents ;
117
+
114
118
commit -> object .flags |= POPPED ;
115
119
if (!(commit -> object .flags & COMMON ))
116
120
non_common_revs -- ;
117
121
118
- parents = commit -> parents ;
119
-
120
122
if (commit -> object .flags & COMMON ) {
121
123
/* do not send "have", and ignore ancestors */
122
124
commit = NULL ;
@@ -212,7 +214,8 @@ static int find_common(int fd[2], unsigned char *result_sha1,
212
214
if (!lookup_object (sha1 ))
213
215
die ("object not found: %s" , line );
214
216
/* make sure that it is parsed as shallow */
215
- parse_object (sha1 );
217
+ if (!parse_object (sha1 ))
218
+ die ("error in object: %s" , line );
216
219
if (unregister_shallow (sha1 ))
217
220
die ("no shallow found: %s" , line );
218
221
continue ;
0 commit comments