Skip to content

Commit f189853

Browse files
committed
Sync with 2.43.5
* maint-2.43: Git 2.43.5 Git 2.42.3 Git 2.41.2 Git 2.40.3 Git 2.39.5 Revert "Add a helper function to compare file contents" clone: drop the protections where hooks aren't run tests: verify that `clone -c core.hooksPath=/dev/null` works again Revert "core.hooksPath: add some protection while cloning" init: use the correct path of the templates directory again hook: plug a new memory leak ci: stop installing "gcc-13" for osx-gcc ci: avoid bare "gcc" for osx-gcc job ci: drop mention of BREW_INSTALL_PACKAGES variable
2 parents 10dc984 + 6fb37a1 commit f189853

File tree

19 files changed

+672
-175
lines changed

19 files changed

+672
-175
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ jobs:
278278
cc: clang
279279
pool: macos-13
280280
- jobname: osx-gcc
281-
cc: gcc
282-
cc_package: gcc-13
281+
cc: gcc-13
283282
pool: macos-13
284283
- jobname: linux-gcc-default
285284
cc: gcc

Documentation/RelNotes/2.39.5.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Git 2.39.5 Release Notes
2+
========================
3+
4+
Relative to Git 2.39.5, this release has fixes for regressions that
5+
were introduced in 2.39.4, most notably the error message shown when
6+
cloning Git LFS-enabled repositories. It also contains a fix for the
7+
`osx-gcc` CI job.
8+
9+
Fixes since Git 2.39.4
10+
----------------------
11+
12+
* The clone protections introduced in v2.39.4 broke Git LFS-enabled
13+
clones and have therefore been dropped.
14+
15+
* The `core.hooksPath` setting is allowed in repository-local
16+
configs again; The benefits of making it protected were
17+
outweighed by the cost.
18+
19+
* Fix a memory leak.
20+
21+
* CI fix.

Documentation/RelNotes/2.40.3.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.40.3 Release Notes
2+
=========================
3+
4+
This release merges up the regression bug fixes in v2.39.5,
5+
most notably the bug where cloning Git LFS-enabled repositories
6+
failed; see the release notes for that version for details.

Documentation/RelNotes/2.41.2.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.41.2 Release Notes
2+
=========================
3+
4+
This release merges up the regression bug fixes in v2.39.5 and
5+
v2.40.3, most notably the bug where cloning Git LFS-enabled
6+
repositories failed; see the release notes for these versions
7+
for details.

Documentation/RelNotes/2.42.3.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.42.3 Release Notes
2+
=========================
3+
4+
This release merges up the regression bug fixes in v2.39.5,
5+
v2.40.3 and v2.41.2, most notably the bug where cloning Git
6+
LFS-enabled repositories failed; see the release notes for these
7+
versions for details.

Documentation/RelNotes/2.43.5.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.43.5 Release Notes
2+
=========================
3+
4+
This release merges up the regression bug fixes in v2.39.5,
5+
v2.40.3, v2.41.2 and v2.42.3, most notably the bug where cloning
6+
Git LFS-enabled repositories failed; see the release notes for
7+
these versions for details.

builtin/clone.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
965965
int hash_algo;
966966
unsigned int ref_storage_format = REF_STORAGE_FORMAT_UNKNOWN;
967967
const int do_not_override_repo_unix_permissions = -1;
968-
const char *template_dir;
969-
char *template_dir_dup = NULL;
970968

971969
struct transport_ls_refs_options transport_ls_refs_options =
972970
TRANSPORT_LS_REFS_OPTIONS_INIT;
@@ -986,13 +984,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
986984
usage_msg_opt(_("You must specify a repository to clone."),
987985
builtin_clone_usage, builtin_clone_options);
988986

989-
xsetenv("GIT_CLONE_PROTECTION_ACTIVE", "true", 0 /* allow user override */);
990-
template_dir = get_template_dir(option_template);
991-
if (*template_dir && !is_absolute_path(template_dir))
992-
template_dir = template_dir_dup =
993-
absolute_pathdup(template_dir);
994-
xsetenv("GIT_CLONE_TEMPLATE_DIR", template_dir, 1);
995-
996987
if (option_depth || option_since || option_not.nr)
997988
deepen = 1;
998989
if (option_single_branch == -1)
@@ -1154,7 +1145,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
11541145
* repository, and reference backends may persist that information into
11551146
* their on-disk data structures.
11561147
*/
1157-
init_db(git_dir, real_git_dir, template_dir, GIT_HASH_UNKNOWN,
1148+
init_db(git_dir, real_git_dir, option_template, GIT_HASH_UNKNOWN,
11581149
ref_storage_format, NULL,
11591150
do_not_override_repo_unix_permissions, INIT_DB_QUIET | INIT_DB_SKIP_REFDB);
11601151

@@ -1498,7 +1489,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
14981489
free(dir);
14991490
free(path);
15001491
free(repo_to_free);
1501-
free(template_dir_dup);
1492+
UNLEAK(repo);
15021493
junk_mode = JUNK_LEAVE_ALL;
15031494

15041495
transport_ls_refs_options_release(&transport_ls_refs_options);

0 commit comments

Comments
 (0)