Git fork

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>

authored by

Martin Ågren and committed by
Junio C Hamano
e5afd444 1e6771e5

+7 -7
+1 -1
Makefile
··· 937 LIB_OBJS += notes-merge.o 938 LIB_OBJS += notes-utils.o 939 LIB_OBJS += notes.o 940 LIB_OBJS += object-name.o 941 LIB_OBJS += object.o 942 LIB_OBJS += oid-array.o ··· 994 LIB_OBJS += serve.o 995 LIB_OBJS += server-info.o 996 LIB_OBJS += setup.o 997 - LIB_OBJS += sha1-file.o 998 LIB_OBJS += sha1-lookup.o 999 LIB_OBJS += shallow.o 1000 LIB_OBJS += sideband.o
··· 937 LIB_OBJS += notes-merge.o 938 LIB_OBJS += notes-utils.o 939 LIB_OBJS += notes.o 940 + LIB_OBJS += object-file.o 941 LIB_OBJS += object-name.o 942 LIB_OBJS += object.o 943 LIB_OBJS += oid-array.o ··· 995 LIB_OBJS += serve.o 996 LIB_OBJS += server-info.o 997 LIB_OBJS += setup.o 998 LIB_OBJS += sha1-lookup.o 999 LIB_OBJS += shallow.o 1000 LIB_OBJS += sideband.o
+1 -1
builtin/index-pack.c
··· 1641 /* 1642 * Get rid of the idx file as we do not need it anymore. 1643 * NEEDSWORK: extract this bit from free_pack_by_name() in 1644 - * sha1-file.c, perhaps? It shouldn't matter very much as we 1645 * know we haven't installed this pack (hence we never have 1646 * read anything from it). 1647 */
··· 1641 /* 1642 * Get rid of the idx file as we do not need it anymore. 1643 * NEEDSWORK: extract this bit from free_pack_by_name() in 1644 + * object-file.c, perhaps? It shouldn't matter very much as we 1645 * know we haven't installed this pack (hence we never have 1646 * read anything from it). 1647 */
+4 -4
sha1-file.c object-file.c
··· 3 * 4 * Copyright (C) Linus Torvalds, 2005 5 * 6 - * This handles basic git sha1 object files - packing, unpacking, 7 * creation etc. 8 */ 9 #include "cache.h" ··· 508 * LF separated. Its base points at a statically allocated buffer that 509 * contains "/the/directory/corresponding/to/.git/objects/...", while 510 * its name points just after the slash at the end of ".git/objects/" 511 - * in the example above, and has enough space to hold 40-byte hex 512 - * SHA1, an extra slash for the first level indirection, and the 513 - * terminating NUL. 514 */ 515 static void read_info_alternates(struct repository *r, 516 const char *relative_base,
··· 3 * 4 * Copyright (C) Linus Torvalds, 2005 5 * 6 + * This handles basic git object files - packing, unpacking, 7 * creation etc. 8 */ 9 #include "cache.h" ··· 508 * LF separated. Its base points at a statically allocated buffer that 509 * contains "/the/directory/corresponding/to/.git/objects/...", while 510 * its name points just after the slash at the end of ".git/objects/" 511 + * in the example above, and has enough space to hold all hex characters 512 + * of the object ID, an extra slash for the first level indirection, and 513 + * the terminating NUL. 514 */ 515 static void read_info_alternates(struct repository *r, 516 const char *relative_base,
+1 -1
t/oid-info/README
··· 5 (specifically, those whitespace in the default `$IFS`). The key consists only 6 of shell identifier characters, and the value consists of a hash algorithm, 7 colon, and value. The hash algorithm also consists only of shell identifier 8 - characters; it should match the value in sha1-file.c. 9 10 For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use 11 and to "32" if SHA-256 is in use:
··· 5 (specifically, those whitespace in the default `$IFS`). The key consists only 6 of shell identifier characters, and the value consists of a hash algorithm, 7 colon, and value. The hash algorithm also consists only of shell identifier 8 + characters; it should match the value in object-file.c. 9 10 For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use 11 and to "32" if SHA-256 is in use: