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>

Martin Ågren committed Dec 31, 2020 at 12:56 UTC e5afd4449d7f1adfd02eca573c23e7ae9c96b28d
4 files changed +7 -7
Makefile
+1 -1
@@ -937,6 +937,7 @@ LIB_OBJS += notes-cache.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
@@ -994,7 +995,6 @@ LIB_OBJS += sequencer.o
995 LIB_OBJS += serve.o
996 LIB_OBJS += server-info.o
997 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
builtin/index-pack.c
+1 -1
@@ -1641,7 +1641,7 @@ static void read_idx_option(struct pack_idx_option *opts, const char *pack_name)
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
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 */
object-file.c renamed
+4 -4
@@ -3,7 +3,7 @@
3 *
4 * Copyright (C) Linus Torvalds, 2005
5 *
6 - * This handles basic git sha1 object files - packing, unpacking,
6 + * This handles basic git object files - packing, unpacking,
7 * creation etc.
8 */
9 #include "cache.h"
@@ -508,9 +508,9 @@ static int alt_odb_usable(struct raw_object_store *o,
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.
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,
t/oid-info/README
+1 -1
@@ -5,7 +5,7 @@ starting with `#` are ignored. The key and value are separated by whitespace
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.
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: