combine-diff: convert diff_tree_combined to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									bd25f28876
								
							
						
					
					
						commit
						b9acf54dbd
					
				|  | @ -194,7 +194,7 @@ static int builtin_diff_combined(struct rev_info *revs, | |||
| 		revs->dense_combined_merges = revs->combine_merges = 1; | ||||
| 	for (i = 1; i < ents; i++) | ||||
| 		oid_array_append(&parents, &ent[i].item->oid); | ||||
| 	diff_tree_combined(ent[0].item->oid.hash, &parents, | ||||
| 	diff_tree_combined(&ent[0].item->oid, &parents, | ||||
| 			   revs->dense_combined_merges, revs); | ||||
| 	oid_array_clear(&parents); | ||||
| 	return 0; | ||||
|  |  | |||
|  | @ -1384,7 +1384,7 @@ static struct combine_diff_path *find_paths_multitree( | |||
| } | ||||
|  | ||||
|  | ||||
| void diff_tree_combined(const unsigned char *sha1, | ||||
| void diff_tree_combined(const struct object_id *oid, | ||||
| 			const struct oid_array *parents, | ||||
| 			int dense, | ||||
| 			struct rev_info *rev) | ||||
|  | @ -1448,11 +1448,11 @@ void diff_tree_combined(const unsigned char *sha1, | |||
| 		 * diff(sha1,parent_i) for all i to do the job, specifically | ||||
| 		 * for parent0. | ||||
| 		 */ | ||||
| 		paths = find_paths_generic(sha1, parents, &diffopts); | ||||
| 		paths = find_paths_generic(oid->hash, parents, &diffopts); | ||||
| 	} | ||||
| 	else { | ||||
| 		int stat_opt; | ||||
| 		paths = find_paths_multitree(sha1, parents, &diffopts); | ||||
| 		paths = find_paths_multitree(oid->hash, parents, &diffopts); | ||||
|  | ||||
| 		/* | ||||
| 		 * show stat against the first parent even | ||||
|  | @ -1463,7 +1463,7 @@ void diff_tree_combined(const unsigned char *sha1, | |||
| 		if (stat_opt) { | ||||
| 			diffopts.output_format = stat_opt; | ||||
|  | ||||
| 			diff_tree_sha1(parents->oid[0].hash, sha1, "", &diffopts); | ||||
| 			diff_tree_sha1(parents->oid[0].hash, oid->hash, "", &diffopts); | ||||
| 			diffcore_std(&diffopts); | ||||
| 			if (opt->orderfile) | ||||
| 				diffcore_order(opt->orderfile); | ||||
|  | @ -1539,6 +1539,6 @@ void diff_tree_combined_merge(const struct commit *commit, int dense, | |||
| 		oid_array_append(&parents, &parent->item->object.oid); | ||||
| 		parent = parent->next; | ||||
| 	} | ||||
| 	diff_tree_combined(commit->object.oid.hash, &parents, dense, rev); | ||||
| 	diff_tree_combined(&commit->object.oid, &parents, dense, rev); | ||||
| 	oid_array_clear(&parents); | ||||
| } | ||||
|  |  | |||
							
								
								
									
										2
									
								
								diff.h
								
								
								
								
							
							
						
						
									
										2
									
								
								diff.h
								
								
								
								
							|  | @ -236,7 +236,7 @@ struct combine_diff_path { | |||
| extern void show_combined_diff(struct combine_diff_path *elem, int num_parent, | ||||
| 			      int dense, struct rev_info *); | ||||
|  | ||||
| extern void diff_tree_combined(const unsigned char *sha1, const struct oid_array *parents, int dense, struct rev_info *rev); | ||||
| extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev); | ||||
|  | ||||
| extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev); | ||||
|  | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Brandon Williams
						Brandon Williams