object-file.c: rename from sha1-file.c
Drop the last remnant of "sha1" in this file and rename it to reflect that we're not just able to handle SHA-1 these days. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									1e6771e504
								
							
						
					
					
						commit
						e5afd4449d
					
				
							
								
								
									
										2
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										2
									
								
								Makefile
								
								
								
								
							|  | @ -937,6 +937,7 @@ LIB_OBJS += notes-cache.o | ||||||
| LIB_OBJS += notes-merge.o | LIB_OBJS += notes-merge.o | ||||||
| LIB_OBJS += notes-utils.o | LIB_OBJS += notes-utils.o | ||||||
| LIB_OBJS += notes.o | LIB_OBJS += notes.o | ||||||
|  | LIB_OBJS += object-file.o | ||||||
| LIB_OBJS += object-name.o | LIB_OBJS += object-name.o | ||||||
| LIB_OBJS += object.o | LIB_OBJS += object.o | ||||||
| LIB_OBJS += oid-array.o | LIB_OBJS += oid-array.o | ||||||
|  | @ -994,7 +995,6 @@ LIB_OBJS += sequencer.o | ||||||
| LIB_OBJS += serve.o | LIB_OBJS += serve.o | ||||||
| LIB_OBJS += server-info.o | LIB_OBJS += server-info.o | ||||||
| LIB_OBJS += setup.o | LIB_OBJS += setup.o | ||||||
| LIB_OBJS += sha1-file.o |  | ||||||
| LIB_OBJS += sha1-lookup.o | LIB_OBJS += sha1-lookup.o | ||||||
| LIB_OBJS += shallow.o | LIB_OBJS += shallow.o | ||||||
| LIB_OBJS += sideband.o | LIB_OBJS += sideband.o | ||||||
|  |  | ||||||
|  | @ -1641,7 +1641,7 @@ static void read_idx_option(struct pack_idx_option *opts, const char *pack_name) | ||||||
| 	/* | 	/* | ||||||
| 	 * Get rid of the idx file as we do not need it anymore. | 	 * Get rid of the idx file as we do not need it anymore. | ||||||
| 	 * NEEDSWORK: extract this bit from free_pack_by_name() in | 	 * NEEDSWORK: extract this bit from free_pack_by_name() in | ||||||
| 	 * sha1-file.c, perhaps?  It shouldn't matter very much as we | 	 * object-file.c, perhaps?  It shouldn't matter very much as we | ||||||
| 	 * know we haven't installed this pack (hence we never have | 	 * know we haven't installed this pack (hence we never have | ||||||
| 	 * read anything from it). | 	 * read anything from it). | ||||||
| 	 */ | 	 */ | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
|  * |  * | ||||||
|  * Copyright (C) Linus Torvalds, 2005 |  * Copyright (C) Linus Torvalds, 2005 | ||||||
|  * |  * | ||||||
|  * This handles basic git sha1 object files - packing, unpacking, |  * This handles basic git object files - packing, unpacking, | ||||||
|  * creation etc. |  * creation etc. | ||||||
|  */ |  */ | ||||||
| #include "cache.h" | #include "cache.h" | ||||||
|  | @ -508,9 +508,9 @@ static int alt_odb_usable(struct raw_object_store *o, | ||||||
|  * LF separated.  Its base points at a statically allocated buffer that |  * LF separated.  Its base points at a statically allocated buffer that | ||||||
|  * contains "/the/directory/corresponding/to/.git/objects/...", while |  * contains "/the/directory/corresponding/to/.git/objects/...", while | ||||||
|  * its name points just after the slash at the end of ".git/objects/" |  * its name points just after the slash at the end of ".git/objects/" | ||||||
|  * in the example above, and has enough space to hold 40-byte hex |  * in the example above, and has enough space to hold all hex characters | ||||||
|  * SHA1, an extra slash for the first level indirection, and the |  * of the object ID, an extra slash for the first level indirection, and | ||||||
|  * terminating NUL. |  * the terminating NUL. | ||||||
|  */ |  */ | ||||||
| static void read_info_alternates(struct repository *r, | static void read_info_alternates(struct repository *r, | ||||||
| 				 const char *relative_base, | 				 const char *relative_base, | ||||||
|  | @ -5,7 +5,7 @@ starting with `#` are ignored.  The key and value are separated by whitespace | ||||||
| (specifically, those whitespace in the default `$IFS`).  The key consists only | (specifically, those whitespace in the default `$IFS`).  The key consists only | ||||||
| of shell identifier characters, and the value consists of a hash algorithm, | of shell identifier characters, and the value consists of a hash algorithm, | ||||||
| colon, and value.  The hash algorithm also consists only of shell identifier | colon, and value.  The hash algorithm also consists only of shell identifier | ||||||
| characters; it should match the value in sha1-file.c. | characters; it should match the value in object-file.c. | ||||||
|  |  | ||||||
| For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use | For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use | ||||||
| and to "32" if SHA-256 is in use: | and to "32" if SHA-256 is in use: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Martin Ågren
						Martin Ågren