diff mbox series

[rPATCH,v2] setup: fix bug with "includeIf.onbranch" when initializing dir

Message ID xmqqjzjlz6p6.fsf_-_@gitster.g (mailing list archive)
State New, archived
Headers show
Series [rPATCH,v2] setup: fix bug with "includeIf.onbranch" when initializing dir | expand

Commit Message

Junio C Hamano May 23, 2024, 12:56 a.m. UTC
And this is "git show --remerge-diff" output for the merge that
merges the result of applying the previous patch to v2.44.0 into
v2.45.0-rc0~112 (which removed the 'prev_bare_repository' thing).

The resolution of conflicts in setup.c is trivial.  The change to
t/t0001-init.sh is an evil one.
diff mbox series

Patch

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 319ed81631..49e9bf77c6 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -584,7 +584,7 @@  test_expect_success 'init with --ref-format=files' '
 	test_cmp expect actual
 '
 
-backends="files"
+backends="files reftable"
 for from_format in $backends
 do
 	test_expect_success "re-init with same format ($from_format)" '
diff --git a/setup.c b/setup.c
remerge CONFLICT (content): Merge conflict in setup.c
index 2f23ab6efa..e01462863b 100644
--- a/setup.c
+++ b/setup.c
@@ -2175,23 +2175,6 @@  int init_db(const char *git_dir, const char *real_git_dir,
 	}
 	startup_info->have_repository = 1;
 
-<<<<<<< 272fd9125a (Merge branch 'gt/core-bare-in-templates')
-	/* Ensure `core.hidedotfiles` is processed */
-	git_config(platform_core_config, NULL);
-
-	safe_create_dir(git_dir, 0);
-
-
-||||||| 3c2a3fdc38
-	/* Ensure `core.hidedotfiles` is processed */
-	git_config(platform_core_config, NULL);
-
-	safe_create_dir(git_dir, 0);
-
-	prev_bare_repository = is_bare_repository();
-
-=======
->>>>>>> 7a998665dd (setup: fix bug with "includeIf.onbranch" when initializing dir)
 	/* Check to see if the repository version is right.
 	 * Note that a newly created repository does not have
 	 * config file, so this will not fail.  What we are catching
@@ -2202,17 +2185,6 @@  int init_db(const char *git_dir, const char *real_git_dir,
 	validate_hash_algorithm(&repo_fmt, hash);
 	validate_ref_storage_format(&repo_fmt, ref_storage_format);
 
-<<<<<<< 272fd9125a (Merge branch 'gt/core-bare-in-templates')
-	reinit = create_default_files(template_dir, original_git_dir,
-				      &repo_fmt, init_shared_repository);
-
-||||||| 3c2a3fdc38
-	reinit = create_default_files(template_dir, original_git_dir,
-				      &repo_fmt, prev_bare_repository,
-				      init_shared_repository);
-
-=======
->>>>>>> 7a998665dd (setup: fix bug with "includeIf.onbranch" when initializing dir)
 	/*
 	 * Now that we have set up both the hash algorithm and the ref storage
 	 * format we can update the repository's settings accordingly.
@@ -2229,11 +2201,8 @@  int init_db(const char *git_dir, const char *real_git_dir,
 
 	safe_create_dir(git_dir, 0);
 
-	prev_bare_repository = is_bare_repository();
-
 	reinit = create_default_files(template_dir, original_git_dir,
-				      &repo_fmt, prev_bare_repository,
-				      init_shared_repository);
+				      &repo_fmt, init_shared_repository);
 
 	if (!(flags & INIT_DB_SKIP_REFDB))
 		create_reference_database(repo_fmt.ref_storage_format,