Merge branch 'bw/object-id'
Conversion from uchar[20] to struct object_id continues. * bw/object-id: receive-pack: don't access hash of NULL object_id pointer notes: don't access hash of NULL object_id pointer tree-diff: don't access hash of NULL object_id pointermaint
						commit
						c7528f4d8a
					
				|  | @ -456,7 +456,7 @@ static int add(int argc, const char **argv, const char *prefix) | ||||||
| 			oid_to_hex(&object)); | 			oid_to_hex(&object)); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	prepare_note_data(&object, &d, note->hash); | 	prepare_note_data(&object, &d, note ? note->hash : NULL); | ||||||
| 	if (d.buf.len || allow_empty) { | 	if (d.buf.len || allow_empty) { | ||||||
| 		write_note_data(&d, new_note.hash); | 		write_note_data(&d, new_note.hash); | ||||||
| 		if (add_note(t, &object, &new_note, combine_notes_overwrite)) | 		if (add_note(t, &object, &new_note, combine_notes_overwrite)) | ||||||
|  |  | ||||||
|  | @ -1138,7 +1138,7 @@ static const char *update(struct command *cmd, struct shallow_info *si) | ||||||
| 		} | 		} | ||||||
| 		if (ref_transaction_delete(transaction, | 		if (ref_transaction_delete(transaction, | ||||||
| 					   namespaced_name, | 					   namespaced_name, | ||||||
| 					   old_oid->hash, | 					   old_oid ? old_oid->hash : NULL, | ||||||
| 					   0, "push", &err)) { | 					   0, "push", &err)) { | ||||||
| 			rp_error("%s", err.buf); | 			rp_error("%s", err.buf); | ||||||
| 			strbuf_release(&err); | 			strbuf_release(&err); | ||||||
|  |  | ||||||
|  | @ -421,8 +421,9 @@ static struct combine_diff_path *ll_diff_tree_paths( | ||||||
| 	 *   diff_tree_oid(parent, commit) ) | 	 *   diff_tree_oid(parent, commit) ) | ||||||
| 	 */ | 	 */ | ||||||
| 	for (i = 0; i < nparent; ++i) | 	for (i = 0; i < nparent; ++i) | ||||||
| 		tptree[i] = fill_tree_descriptor(&tp[i], parents_oid[i]->hash); | 		tptree[i] = fill_tree_descriptor(&tp[i], | ||||||
| 	ttree = fill_tree_descriptor(&t, oid->hash); | 				parents_oid[i] ? parents_oid[i]->hash : NULL); | ||||||
|  | 	ttree = fill_tree_descriptor(&t, oid ? oid->hash : NULL); | ||||||
|  |  | ||||||
| 	/* Enable recursion indefinitely */ | 	/* Enable recursion indefinitely */ | ||||||
| 	opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE); | 	opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Junio C Hamano
						Junio C Hamano