Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 19:14:39 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-14 00:14:44 +0300
commit82ea77eca7af238f1ee65f5cbc945a01e16ee97a (patch)
treeb22a81980f6a20a4e9148233f124f5d6bb5c4270 /apply.h
parent332a82a52222da253cd5023cd4c5cde2d51636b9 (diff)
apply.c: make init_apply_state() take a struct repository
We're moving away from the_index in this code. "struct index_state *" could be added to struct apply_state. But let's aim long term and put struct repository here instead so that we could even avoid more global states in the future. The index will be available via apply_state->repo->index. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'apply.h')
-rw-r--r--apply.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/apply.h b/apply.h
index 01963b5ec4..78c8bcfc3c 100644
--- a/apply.h
+++ b/apply.h
@@ -1,6 +1,8 @@
#ifndef APPLY_H
#define APPLY_H
+struct repository;
+
enum apply_ws_error_action {
nowarn_ws_error,
warn_on_ws_error,
@@ -62,6 +64,7 @@ struct apply_state {
int unsafe_paths;
/* Other non boolean parameters */
+ struct repository *repo;
const char *index_file;
enum apply_verbosity apply_verbosity;
const char *fake_ancestor;
@@ -116,6 +119,7 @@ int apply_parse_options(int argc, const char **argv,
int *force_apply, int *options,
const char * const *apply_usage);
int init_apply_state(struct apply_state *state,
+ struct repository *repo,
const char *prefix);
void clear_apply_state(struct apply_state *state);
int check_apply_state(struct apply_state *state, int force_apply);