This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			461 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			461 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include "cache.h"
 | |
| #include "blob.h"
 | |
| #include "repository.h"
 | |
| #include "alloc.h"
 | |
| 
 | |
| const char *blob_type = "blob";
 | |
| 
 | |
| struct blob *lookup_blob(struct repository *r, const struct object_id *oid)
 | |
| {
 | |
| 	struct object *obj = lookup_object(r, oid);
 | |
| 	if (!obj)
 | |
| 		return create_object(r, oid, alloc_blob_node(r));
 | |
| 	return object_as_type(obj, OBJ_BLOB, 0);
 | |
| }
 | |
| 
 | |
| int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
 | |
| {
 | |
| 	item->object.parsed = 1;
 | |
| 	return 0;
 | |
| }
 |