Skip to content

Commit a768f86

Browse files
committed
Merge branch 'jk/oid-array-cleanups'
Code cleanup. * jk/oid-array-cleanups: oidset: stop referring to sha1-array ref-filter: stop referring to "sha1 array" bisect: stop referring to sha1_array test-tool: rename sha1-array to oid-array oid_array: rename source file from sha1-array oid_array: use size_t for iteration oid_array: use size_t for count and allocation
2 parents 7a8bb6d + 0740d0a commit a768f86

32 files changed

+54
-55
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ TEST_BUILTINS_OBJS += test-run-command.o
738738
TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
739739
TEST_BUILTINS_OBJS += test-serve-v2.o
740740
TEST_BUILTINS_OBJS += test-sha1.o
741-
TEST_BUILTINS_OBJS += test-sha1-array.o
741+
TEST_BUILTINS_OBJS += test-oid-array.o
742742
TEST_BUILTINS_OBJS += test-sha256.o
743743
TEST_BUILTINS_OBJS += test-sigchain.o
744744
TEST_BUILTINS_OBJS += test-strcmp-offset.o
@@ -929,6 +929,7 @@ LIB_OBJS += notes-utils.o
929929
LIB_OBJS += object.o
930930
LIB_OBJS += oidmap.o
931931
LIB_OBJS += oidset.o
932+
LIB_OBJS += oid-array.o
932933
LIB_OBJS += packfile.o
933934
LIB_OBJS += pack-bitmap.o
934935
LIB_OBJS += pack-bitmap-write.o
@@ -978,7 +979,6 @@ LIB_OBJS += sequencer.o
978979
LIB_OBJS += serve.o
979980
LIB_OBJS += server-info.o
980981
LIB_OBJS += setup.o
981-
LIB_OBJS += sha1-array.o
982982
LIB_OBJS += sha1-lookup.o
983983
LIB_OBJS += sha1-file.o
984984
LIB_OBJS += sha1-name.o

bisect.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "run-command.h"
1111
#include "log-tree.h"
1212
#include "bisect.h"
13-
#include "sha1-array.h"
13+
#include "oid-array.h"
1414
#include "argv-array.h"
1515
#include "commit-slab.h"
1616
#include "commit-reach.h"
@@ -473,7 +473,7 @@ static void read_bisect_paths(struct argv_array *array)
473473
fclose(fp);
474474
}
475475

476-
static char *join_sha1_array_hex(struct oid_array *array, char delim)
476+
static char *join_oid_array_hex(struct oid_array *array, char delim)
477477
{
478478
struct strbuf joined_hexs = STRBUF_INIT;
479479
int i;
@@ -765,7 +765,7 @@ static enum bisect_error handle_bad_merge_base(void)
765765
{
766766
if (is_expected_rev(current_bad_oid)) {
767767
char *bad_hex = oid_to_hex(current_bad_oid);
768-
char *good_hex = join_sha1_array_hex(&good_revs, ' ');
768+
char *good_hex = join_oid_array_hex(&good_revs, ' ');
769769
if (!strcmp(term_bad, "bad") && !strcmp(term_good, "good")) {
770770
fprintf(stderr, _("The merge base %s is bad.\n"
771771
"This means the bug has been fixed "
@@ -796,7 +796,7 @@ static void handle_skipped_merge_base(const struct object_id *mb)
796796
{
797797
char *mb_hex = oid_to_hex(mb);
798798
char *bad_hex = oid_to_hex(current_bad_oid);
799-
char *good_hex = join_sha1_array_hex(&good_revs, ' ');
799+
char *good_hex = join_oid_array_hex(&good_revs, ' ');
800800

801801
warning(_("the merge base between %s and [%s] "
802802
"must be skipped.\n"

builtin/cat-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "userdiff.h"
1313
#include "streaming.h"
1414
#include "tree-walk.h"
15-
#include "sha1-array.h"
15+
#include "oid-array.h"
1616
#include "packfile.h"
1717
#include "object-store.h"
1818
#include "promisor-remote.h"

builtin/diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "log-tree.h"
1818
#include "builtin.h"
1919
#include "submodule.h"
20-
#include "sha1-array.h"
20+
#include "oid-array.h"
2121

2222
#define DIFF_NO_INDEX_EXPLICIT 1
2323
#define DIFF_NO_INDEX_IMPLICIT 2

builtin/fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "fetch-pack.h"
44
#include "remote.h"
55
#include "connect.h"
6-
#include "sha1-array.h"
6+
#include "oid-array.h"
77
#include "protocol.h"
88

99
static const char fetch_pack_usage[] =

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "pack-bitmap.h"
2727
#include "delta-islands.h"
2828
#include "reachable.h"
29-
#include "sha1-array.h"
29+
#include "oid-array.h"
3030
#include "argv-array.h"
3131
#include "list.h"
3232
#include "packfile.h"

builtin/pull.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "parse-options.h"
1313
#include "exec-cmd.h"
1414
#include "run-command.h"
15-
#include "sha1-array.h"
15+
#include "oid-array.h"
1616
#include "remote.h"
1717
#include "dir.h"
1818
#include "rebase.h"

builtin/receive-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "remote.h"
1414
#include "connect.h"
1515
#include "string-list.h"
16-
#include "sha1-array.h"
16+
#include "oid-array.h"
1717
#include "connected.h"
1818
#include "argv-array.h"
1919
#include "version.h"

builtin/send-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "quote.h"
1212
#include "transport.h"
1313
#include "version.h"
14-
#include "sha1-array.h"
14+
#include "oid-array.h"
1515
#include "gpg-interface.h"
1616
#include "gettext.h"
1717
#include "protocol.h"

builtin/tag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "diff.h"
1818
#include "revision.h"
1919
#include "gpg-interface.h"
20-
#include "sha1-array.h"
20+
#include "oid-array.h"
2121
#include "column.h"
2222
#include "ref-filter.h"
2323

0 commit comments

Comments
 (0)