Skip to content

Commit cce48b6

Browse files
committed
Sync with 2.41.2
* maint-2.41: 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 babb4e5 + 7d8ce07 commit cce48b6

File tree

17 files changed

+601
-226
lines changed

17 files changed

+601
-226
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.

builtin/clone.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
960960
int filter_submodules = 0;
961961
int hash_algo;
962962
const int do_not_override_repo_unix_permissions = -1;
963-
const char *template_dir;
964-
char *template_dir_dup = NULL;
965963

966964
struct transport_ls_refs_options transport_ls_refs_options =
967965
TRANSPORT_LS_REFS_OPTIONS_INIT;
@@ -981,13 +979,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
981979
usage_msg_opt(_("You must specify a repository to clone."),
982980
builtin_clone_usage, builtin_clone_options);
983981

984-
xsetenv("GIT_CLONE_PROTECTION_ACTIVE", "true", 0 /* allow user override */);
985-
template_dir = get_template_dir(option_template);
986-
if (*template_dir && !is_absolute_path(template_dir))
987-
template_dir = template_dir_dup =
988-
absolute_pathdup(template_dir);
989-
xsetenv("GIT_CLONE_TEMPLATE_DIR", template_dir, 1);
990-
991982
if (option_depth || option_since || option_not.nr)
992983
deepen = 1;
993984
if (option_single_branch == -1)
@@ -1135,7 +1126,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
11351126
}
11361127
}
11371128

1138-
init_db(git_dir, real_git_dir, template_dir, GIT_HASH_UNKNOWN, NULL,
1129+
init_db(git_dir, real_git_dir, option_template, GIT_HASH_UNKNOWN, NULL,
11391130
do_not_override_repo_unix_permissions, INIT_DB_QUIET);
11401131

11411132
if (real_git_dir) {
@@ -1479,7 +1470,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
14791470
free(dir);
14801471
free(path);
14811472
free(repo_to_free);
1482-
free(template_dir_dup);
1473+
UNLEAK(repo);
14831474
junk_mode = JUNK_LEAVE_ALL;
14841475

14851476
transport_ls_refs_options_release(&transport_ls_refs_options);

0 commit comments

Comments
 (0)