Skip to content

Commit e5afd44

Browse files
Martin Ågrengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e6771e commit e5afd44

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ LIB_OBJS += notes-cache.o
937937
LIB_OBJS += notes-merge.o
938938
LIB_OBJS += notes-utils.o
939939
LIB_OBJS += notes.o
940+
LIB_OBJS += object-file.o
940941
LIB_OBJS += object-name.o
941942
LIB_OBJS += object.o
942943
LIB_OBJS += oid-array.o
@@ -994,7 +995,6 @@ LIB_OBJS += sequencer.o
994995
LIB_OBJS += serve.o
995996
LIB_OBJS += server-info.o
996997
LIB_OBJS += setup.o
997-
LIB_OBJS += sha1-file.o
998998
LIB_OBJS += sha1-lookup.o
999999
LIB_OBJS += shallow.o
10001000
LIB_OBJS += sideband.o

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ static void read_idx_option(struct pack_idx_option *opts, const char *pack_name)
16411641
/*
16421642
* Get rid of the idx file as we do not need it anymore.
16431643
* 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
16451645
* know we haven't installed this pack (hence we never have
16461646
* read anything from it).
16471647
*/

sha1-file.c renamed to object-file.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (C) Linus Torvalds, 2005
55
*
6-
* This handles basic git sha1 object files - packing, unpacking,
6+
* This handles basic git object files - packing, unpacking,
77
* creation etc.
88
*/
99
#include "cache.h"
@@ -508,9 +508,9 @@ static int alt_odb_usable(struct raw_object_store *o,
508508
* LF separated. Its base points at a statically allocated buffer that
509509
* contains "/the/directory/corresponding/to/.git/objects/...", while
510510
* 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.
514514
*/
515515
static void read_info_alternates(struct repository *r,
516516
const char *relative_base,

t/oid-info/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ starting with `#` are ignored. The key and value are separated by whitespace
55
(specifically, those whitespace in the default `$IFS`). The key consists only
66
of shell identifier characters, and the value consists of a hash algorithm,
77
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.
99

1010
For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use
1111
and to "32" if SHA-256 is in use:

0 commit comments

Comments
 (0)