Skip to content

Commit

Permalink
hash-ll: merge with "hash.h"
Browse files Browse the repository at this point in the history
The "hash-ll.h" header was introduced via d1cbe1e (hash-ll.h: split
out of hash.h to remove dependency on repository.h, 2023-04-22) to make
explicit the split between hash-related functions that rely on the
global `the_repository`, and those that don't. This split is no longer
necessary now that we we have removed the reliance on `the_repository`.

Merge "hash-ll.h" back into "hash.h". This causes some code units to not
include "repository.h" anymore, which requires us to add some forward
declarations.

Signed-off-by: Patrick Steinhardt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
pks-t authored and gitster committed Jun 14, 2024
1 parent 36026a0 commit 8a676bd
Show file tree
Hide file tree
Showing 39 changed files with 400 additions and 398 deletions.
2 changes: 1 addition & 1 deletion apply.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef APPLY_H
#define APPLY_H

#include "hash-ll.h"
#include "hash.h"
#include "lockfile.h"
#include "string-list.h"
#include "strmap.h"
Expand Down
1 change: 1 addition & 0 deletions bloom.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "commit-graph.h"
#include "commit.h"
#include "commit-slab.h"
#include "repository.h"

define_commit_slab(bloom_filter_slab, struct bloom_filter);

Expand Down
2 changes: 1 addition & 1 deletion checkout.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CHECKOUT_H
#define CHECKOUT_H

#include "hash-ll.h"
#include "hash.h"

/*
* Check if the branch name uniquely matches a branch name on a remote
Expand Down
2 changes: 1 addition & 1 deletion chunk-format.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CHUNK_FORMAT_H
#define CHUNK_FORMAT_H

#include "hash-ll.h"
#include "hash.h"

struct hashfile;
struct chunkfile;
Expand Down
2 changes: 2 additions & 0 deletions commit-graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
struct commit_graph *read_commit_graph_one(struct repository *r,
struct object_directory *odb);

struct repo_settings;

/*
* Callers should initialize the repo_settings with prepare_repo_settings()
* prior to calling parse_commit_graph().
Expand Down
2 changes: 1 addition & 1 deletion compat/sha1-chunked.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "git-compat-util.h"
#include "hash-ll.h"
#include "hash.h"

int git_SHA1_Update_Chunked(platform_SHA_CTX *c, const void *data, size_t len)
{
Expand Down
2 changes: 1 addition & 1 deletion convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef CONVERT_H
#define CONVERT_H

#include "hash-ll.h"
#include "hash.h"
#include "string-list.h"

struct index_state;
Expand Down
2 changes: 1 addition & 1 deletion csum-file.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CSUM_FILE_H
#define CSUM_FILE_H

#include "hash-ll.h"
#include "hash.h"
#include "write-or-die.h"

struct progress;
Expand Down
2 changes: 1 addition & 1 deletion diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef DIFF_H
#define DIFF_H

#include "hash-ll.h"
#include "hash.h"
#include "pathspec.h"
#include "strbuf.h"

Expand Down
2 changes: 1 addition & 1 deletion diffcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef DIFFCORE_H
#define DIFFCORE_H

#include "hash-ll.h"
#include "hash.h"

struct diff_options;
struct mem_pool;
Expand Down
2 changes: 1 addition & 1 deletion dir.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DIR_H
#define DIR_H

#include "hash-ll.h"
#include "hash.h"
#include "hashmap.h"
#include "pathspec.h"
#include "statinfo.h"
Expand Down
Loading

0 comments on commit 8a676bd

Please sign in to comment.