bisect: drop unparse_commit() and use clear_commit_marks()
The goal of this patch series is to check if good revisions are ancestor of the bad revision without forking a process to launch "git rev-list $good ^$bad". This new version of this patch series does not use an "unparse_commit" function anymore, we use "clear_commit_marks" instead. Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									2d938fc7bc
								
							
						
					
					
						commit
						7a8e3895f6
					
				
							
								
								
									
										2
									
								
								bisect.c
								
								
								
								
							
							
						
						
									
										2
									
								
								bisect.c
								
								
								
								
							|  | @ -771,7 +771,7 @@ static int check_ancestors(const char *prefix) | ||||||
| 	/* Clean up objects used, as they will be reused. */ | 	/* Clean up objects used, as they will be reused. */ | ||||||
| 	for (i = 0; i < pending_copy.nr; i++) { | 	for (i = 0; i < pending_copy.nr; i++) { | ||||||
| 		struct object *o = pending_copy.objects[i].item; | 		struct object *o = pending_copy.objects[i].item; | ||||||
| 		unparse_commit((struct commit *)o); | 		clear_commit_marks((struct commit *)o, ALL_REV_FLAGS); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return res; | 	return res; | ||||||
|  |  | ||||||
							
								
								
									
										20
									
								
								commit.c
								
								
								
								
							
							
						
						
									
										20
									
								
								commit.c
								
								
								
								
							|  | @ -316,26 +316,6 @@ int parse_commit(struct commit *item) | ||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
| static void unparse_commit_list(struct commit_list *list) |  | ||||||
| { |  | ||||||
| 	for (; list; list = list->next) |  | ||||||
| 		unparse_commit(list->item); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void unparse_commit(struct commit *item) |  | ||||||
| { |  | ||||||
| 	item->object.flags = 0; |  | ||||||
| 	item->object.used = 0; |  | ||||||
| 	if (item->object.parsed) { |  | ||||||
| 		item->object.parsed = 0; |  | ||||||
| 		if (item->parents) { |  | ||||||
| 			unparse_commit_list(item->parents); |  | ||||||
| 			free_commit_list(item->parents); |  | ||||||
| 			item->parents = NULL; |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  |  | ||||||
| struct commit_list *commit_list_insert(struct commit *item, struct commit_list **list_p) | struct commit_list *commit_list_insert(struct commit *item, struct commit_list **list_p) | ||||||
| { | { | ||||||
| 	struct commit_list *new_list = xmalloc(sizeof(struct commit_list)); | 	struct commit_list *new_list = xmalloc(sizeof(struct commit_list)); | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								commit.h
								
								
								
								
							
							
						
						
									
										2
									
								
								commit.h
								
								
								
								
							|  | @ -40,8 +40,6 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size); | ||||||
|  |  | ||||||
| int parse_commit(struct commit *item); | int parse_commit(struct commit *item); | ||||||
|  |  | ||||||
| void unparse_commit(struct commit *item); |  | ||||||
|  |  | ||||||
| struct commit_list * commit_list_insert(struct commit *item, struct commit_list **list_p); | struct commit_list * commit_list_insert(struct commit *item, struct commit_list **list_p); | ||||||
| unsigned commit_list_count(const struct commit_list *l); | unsigned commit_list_count(const struct commit_list *l); | ||||||
| struct commit_list * insert_by_date(struct commit *item, struct commit_list **list); | struct commit_list * insert_by_date(struct commit *item, struct commit_list **list); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Christian Couder
						Christian Couder