Skip to content

Commit f565385

Browse files
newrengitster
authored andcommitted
name-hash.h: move declarations for name-hash.c from cache.h
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 64c8559 commit f565385

File tree

12 files changed

+26
-9
lines changed

12 files changed

+26
-9
lines changed

apply.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "xdiff-interface.h"
2424
#include "ll-merge.h"
2525
#include "lockfile.h"
26+
#include "name-hash.h"
2627
#include "object-name.h"
2728
#include "object-file.h"
2829
#include "parse-options.h"

builtin/mv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "config.h"
1212
#include "environment.h"
1313
#include "gettext.h"
14+
#include "name-hash.h"
1415
#include "object-file.h"
1516
#include "pathspec.h"
1617
#include "lockfile.h"

cache.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,6 @@ struct index_state {
245245
void index_state_init(struct index_state *istate, struct repository *r);
246246
void release_index(struct index_state *istate);
247247

248-
/* Name hashing */
249-
int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
250-
void add_name_hash(struct index_state *istate, struct cache_entry *ce);
251-
void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
252-
void free_name_hash(struct index_state *istate);
253-
254248
/* Cache entry creation and cleanup */
255249

256250
/*
@@ -377,9 +371,6 @@ int repo_index_has_changes(struct repository *repo,
377371

378372
int verify_path(const char *path, unsigned mode);
379373
int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
380-
int index_dir_exists(struct index_state *istate, const char *name, int namelen);
381-
void adjust_dirname_case(struct index_state *istate, char *name);
382-
struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
383374

384375
/*
385376
* Searches for an entry defined by name and namelen in the given index.

dir.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "dir.h"
1414
#include "environment.h"
1515
#include "gettext.h"
16+
#include "name-hash.h"
1617
#include "object-file.h"
1718
#include "object-store.h"
1819
#include "attr.h"

entry.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "environment.h"
66
#include "gettext.h"
77
#include "hex.h"
8+
#include "name-hash.h"
89
#include "streaming.h"
910
#include "submodule.h"
1011
#include "symlinks.h"

merge-recursive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "ll-merge.h"
2424
#include "lockfile.h"
2525
#include "match-trees.h"
26+
#include "name-hash.h"
2627
#include "object-file.h"
2728
#include "object-name.h"
2829
#include "object-store.h"

name-hash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "cache.h"
99
#include "environment.h"
1010
#include "gettext.h"
11+
#include "name-hash.h"
1112
#include "thread-utils.h"
1213
#include "trace.h"
1314
#include "trace2.h"

name-hash.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef NAME_HASH_H
2+
#define NAME_HASH_H
3+
4+
struct cache_entry;
5+
struct index_state;
6+
7+
int index_dir_exists(struct index_state *istate, const char *name, int namelen);
8+
void adjust_dirname_case(struct index_state *istate, char *name);
9+
struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
10+
11+
int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
12+
void add_name_hash(struct index_state *istate, struct cache_entry *ce);
13+
void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
14+
void free_name_hash(struct index_state *istate);
15+
16+
#endif /* NAME_HASH_H */

read-cache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "environment.h"
2626
#include "gettext.h"
2727
#include "mem-pool.h"
28+
#include "name-hash.h"
2829
#include "object-name.h"
2930
#include "resolve-undo.h"
3031
#include "revision.h"

sparse-index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "alloc.h"
33
#include "environment.h"
44
#include "gettext.h"
5+
#include "name-hash.h"
56
#include "repository.h"
67
#include "sparse-index.h"
78
#include "tree.h"

0 commit comments

Comments
 (0)