Skip to content

Commit 6ebd1ca

Browse files
peffgitster
authored andcommitted
check_replace_refs: rename to read_replace_refs
This was added as a NEEDSWORK in c3c36d7 (replace-object: check_replace_refs is safe in multi repo environment, 2018-04-11), waiting for a calmer period. Since doing so now doesn't conflict with anything in 'pu', it seems as good a time as any. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 72470aa commit 6ebd1ca

File tree

13 files changed

+14
-14
lines changed

13 files changed

+14
-14
lines changed

builtin/fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
689689
fetch_if_missing = 0;
690690

691691
errors_found = 0;
692-
check_replace_refs = 0;
692+
read_replace_refs = 0;
693693

694694
argc = parse_options(argc, argv, prefix, fsck_opts, fsck_usage, 0);
695695

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
16791679
if (argc == 2 && !strcmp(argv[1], "-h"))
16801680
usage(index_pack_usage);
16811681

1682-
check_replace_refs = 0;
1682+
read_replace_refs = 0;
16831683
fsck_options.walk = mark_link;
16841684

16851685
reset_pack_idx_option(&opts);

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3188,7 +3188,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
31883188
if (DFS_NUM_STATES > (1 << OE_DFS_STATE_BITS))
31893189
BUG("too many dfs states, increase OE_DFS_STATE_BITS");
31903190

3191-
check_replace_refs = 0;
3191+
read_replace_refs = 0;
31923192

31933193
reset_pack_idx_option(&pack_idx_opts);
31943194
git_config(git_pack_config, NULL);

builtin/prune.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
118118

119119
expire = TIME_MAX;
120120
save_commit_buffer = 0;
121-
check_replace_refs = 0;
121+
read_replace_refs = 0;
122122
ref_paranoia = 1;
123123
init_revisions(&revs, prefix);
124124

builtin/replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
544544
OPT_END()
545545
};
546546

547-
check_replace_refs = 0;
547+
read_replace_refs = 0;
548548
git_config(git_default_config, NULL);
549549

550550
argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);

builtin/unpack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix)
513513
int i;
514514
struct object_id oid;
515515

516-
check_replace_refs = 0;
516+
read_replace_refs = 0;
517517

518518
git_config(git_default_config, NULL);
519519

builtin/upload-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int cmd_upload_pack(int argc, const char **argv, const char *prefix)
3131
};
3232

3333
packet_trace_identity("upload-pack");
34-
check_replace_refs = 0;
34+
read_replace_refs = 0;
3535

3636
argc = parse_options(argc, argv, NULL, options, upload_pack_usage, 0);
3737

cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ void reset_shared_repository(void);
806806
* $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
807807
* commands that do not want replace references to be active.
808808
*/
809-
extern int check_replace_refs;
809+
extern int read_replace_refs;
810810
extern char *git_replace_ref_base;
811811

812812
extern int fsync_object_files;

environment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const char *editor_program;
5151
const char *askpass_program;
5252
const char *excludes_file;
5353
enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
54-
int check_replace_refs = 1; /* NEEDSWORK: rename to read_replace_refs */
54+
int read_replace_refs = 1;
5555
char *git_replace_ref_base;
5656
enum eol core_eol = EOL_UNSET;
5757
int global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
@@ -183,7 +183,7 @@ void setup_git_env(const char *git_dir)
183183
argv_array_clear(&to_free);
184184

185185
if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT))
186-
check_replace_refs = 0;
186+
read_replace_refs = 0;
187187
replace_ref_base = getenv(GIT_REPLACE_REF_BASE_ENVIRONMENT);
188188
free(git_replace_ref_base);
189189
git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base

git.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
164164
if (envchanged)
165165
*envchanged = 1;
166166
} else if (!strcmp(cmd, "--no-replace-objects")) {
167-
check_replace_refs = 0;
167+
read_replace_refs = 0;
168168
setenv(NO_REPLACE_OBJECTS_ENVIRONMENT, "1", 1);
169169
if (envchanged)
170170
*envchanged = 1;

0 commit comments

Comments
 (0)