oid_array: rename source file from sha1-array

We renamed the actual data structure in 910650d2f8 (Rename sha1_array to
oid_array, 2017-03-31), but the file is still called sha1-array. Besides
being slightly confusing, it makes it more annoying to grep for leftover
occurrences of "sha1" in various files, because the header is included
in so many places.

Let's complete the transition by renaming the source and header files
(and fixing up a few comment references).

I kept the "-" in the name, as that seems to be our style; cf.
fc1395f4a4 (sha1_file.c: rename to use dash in file name, 2018-04-10).
We also have oidmap.h and oidset.h without any punctuation, but those
are "struct oidmap" and "struct oidset" in the code. We _could_ make
this "oidarray" to match, but somehow it looks uglier to me because of
the length of "array" (plus it would be a very invasive patch for little
gain).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pull/738/head
Jeff King 3 years ago committed by Junio C Hamano
parent eccce5253b
commit fe299ec5ae
  1. 2
      Makefile
  2. 2
      bisect.c
  3. 2
      builtin/cat-file.c
  4. 2
      builtin/diff.c
  5. 2
      builtin/fetch-pack.c
  6. 2
      builtin/pack-objects.c
  7. 2
      builtin/pull.c
  8. 2
      builtin/receive-pack.c
  9. 2
      builtin/send-pack.c
  10. 2
      builtin/tag.c
  11. 2
      cache.h
  12. 2
      combine-diff.c
  13. 2
      connect.c
  14. 2
      delta-islands.c
  15. 2
      fetch-pack.c
  16. 2
      object-store.h
  17. 4
      oid-array.c
  18. 2
      oid-array.h
  19. 2
      parse-options-cb.c
  20. 2
      ref-filter.h
  21. 2
      remote-curl.c
  22. 2
      send-pack.c
  23. 2
      sha1-name.c
  24. 2
      shallow.c
  25. 2
      submodule.c
  26. 2
      t/helper/test-sha1-array.c
  27. 2
      transport.c

@ -929,6 +929,7 @@ LIB_OBJS += notes-utils.o
LIB_OBJS += object.o
LIB_OBJS += oidmap.o
LIB_OBJS += oidset.o
LIB_OBJS += oid-array.o
LIB_OBJS += packfile.o
LIB_OBJS += pack-bitmap.o
LIB_OBJS += pack-bitmap-write.o
@ -978,7 +979,6 @@ LIB_OBJS += sequencer.o
LIB_OBJS += serve.o
LIB_OBJS += server-info.o
LIB_OBJS += setup.o
LIB_OBJS += sha1-array.o
LIB_OBJS += sha1-lookup.o
LIB_OBJS += sha1-file.o
LIB_OBJS += sha1-name.o

@ -10,7 +10,7 @@
#include "run-command.h"
#include "log-tree.h"
#include "bisect.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "argv-array.h"
#include "commit-slab.h"
#include "commit-reach.h"

@ -12,7 +12,7 @@
#include "userdiff.h"
#include "streaming.h"
#include "tree-walk.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "packfile.h"
#include "object-store.h"
#include "promisor-remote.h"

@ -17,7 +17,7 @@
#include "log-tree.h"
#include "builtin.h"
#include "submodule.h"
#include "sha1-array.h"
#include "oid-array.h"
#define DIFF_NO_INDEX_EXPLICIT 1
#define DIFF_NO_INDEX_IMPLICIT 2

@ -3,7 +3,7 @@
#include "fetch-pack.h"
#include "remote.h"
#include "connect.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "protocol.h"
static const char fetch_pack_usage[] =

@ -26,7 +26,7 @@
#include "pack-bitmap.h"
#include "delta-islands.h"
#include "reachable.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "argv-array.h"
#include "list.h"
#include "packfile.h"

@ -12,7 +12,7 @@
#include "parse-options.h"
#include "exec-cmd.h"
#include "run-command.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "remote.h"
#include "dir.h"
#include "rebase.h"

@ -13,7 +13,7 @@
#include "remote.h"
#include "connect.h"
#include "string-list.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "connected.h"
#include "argv-array.h"
#include "version.h"

@ -11,7 +11,7 @@
#include "quote.h"
#include "transport.h"
#include "version.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "gpg-interface.h"
#include "gettext.h"
#include "protocol.h"

@ -17,7 +17,7 @@
#include "diff.h"
#include "revision.h"
#include "gpg-interface.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "column.h"
#include "ref-filter.h"

@ -14,7 +14,7 @@
#include "pack-revindex.h"
#include "hash.h"
#include "path.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "repository.h"
#include "mem-pool.h"

@ -10,7 +10,7 @@
#include "log-tree.h"
#include "refs.h"
#include "userdiff.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "revision.h"
static int compare_paths(const struct combine_diff_path *one,

@ -9,7 +9,7 @@
#include "connect.h"
#include "url.h"
#include "string-list.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "transport.h"
#include "strbuf.h"
#include "version.h"

@ -17,7 +17,7 @@
#include "pack-bitmap.h"
#include "pack-objects.h"
#include "delta-islands.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "config.h"
KHASH_INIT(str, const char *, void *, 1, kh_str_hash_func, kh_str_hash_equal)

@ -15,7 +15,7 @@
#include "connect.h"
#include "transport.h"
#include "version.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "oidset.h"
#include "packfile.h"
#include "object-store.h"

@ -4,7 +4,7 @@
#include "cache.h"
#include "oidmap.h"
#include "list.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "strbuf.h"
#include "thread-utils.h"

@ -1,5 +1,5 @@
#include "cache.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "sha1-lookup.h"
void oid_array_append(struct oid_array *array, const struct object_id *oid)
@ -48,7 +48,7 @@ int oid_array_for_each(struct oid_array *array,
{
size_t i;
/* No oid_array_sort() here! See sha1-array.h */
/* No oid_array_sort() here! See oid-array.h */
for (i = 0; i < array->nr; i++) {
int ret = fn(array->oid + i, data);

@ -19,7 +19,7 @@
*
* void some_func(void)
* {
* struct sha1_array hashes = OID_ARRAY_INIT;
* struct oid_array hashes = OID_ARRAY_INIT;
* struct object_id oid;
*
* // Read objects into our set

@ -5,7 +5,7 @@
#include "color.h"
#include "string-list.h"
#include "argv-array.h"
#include "sha1-array.h"
#include "oid-array.h"
/*----- some often used options -----*/

@ -1,7 +1,7 @@
#ifndef REF_FILTER_H
#define REF_FILTER_H
#include "sha1-array.h"
#include "oid-array.h"
#include "refs.h"
#include "commit.h"
#include "parse-options.h"

@ -12,7 +12,7 @@
#include "sideband.h"
#include "argv-array.h"
#include "credential.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "send-pack.h"
#include "protocol.h"
#include "quote.h"

@ -12,7 +12,7 @@
#include "quote.h"
#include "transport.h"
#include "version.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "gpg-interface.h"
#include "cache.h"

@ -8,7 +8,7 @@
#include "refs.h"
#include "remote.h"
#include "dir.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "packfile.h"
#include "object-store.h"
#include "repository.h"

@ -8,7 +8,7 @@
#include "pkt-line.h"
#include "remote.h"
#include "refs.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "diff.h"
#include "revision.h"
#include "commit-slab.h"

@ -12,7 +12,7 @@
#include "diffcore.h"
#include "refs.h"
#include "string-list.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "argv-array.h"
#include "blob.h"
#include "thread-utils.h"

@ -1,6 +1,6 @@
#include "test-tool.h"
#include "cache.h"
#include "sha1-array.h"
#include "oid-array.h"
static int print_oid(const struct object_id *oid, void *data)
{

@ -16,7 +16,7 @@
#include "url.h"
#include "submodule.h"
#include "string-list.h"
#include "sha1-array.h"
#include "oid-array.h"
#include "sigchain.h"
#include "transport-internal.h"
#include "protocol.h"

Loading…
Cancel
Save