mbox series

[0/8] Various fixes for v2.45.1 and friends

Message ID pull.1732.git.1715987756.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series Various fixes for v2.45.1 and friends | expand

Message

Jean-Noël Avila via GitGitGadget May 17, 2024, 11:15 p.m. UTC
There have been a couple of issues that were reported about v2.45.1, and in
addition I have noticed some myself:

 * a memory leak in the clone protection logic
 * a missed adjustment in the Makefile that leads to an incorrect templates
   path in v2.39.4, v2.40.2 and v2.41.1 (but not in v2.42.2, ..., v2.45.1)
 * an overzealous core.hooksPath check
 * that Git LFS clone problem where it exits with an error (even if the
   clone often succeeded...)

This patch series is based on maint-2.39 to allow for (relatively) easy
follow-up versions v2.39.5, ..., v2.45.2.

Johannes Schindelin (8):
  hook: plug a new memory leak
  init: use the correct path of the templates directory again
  Revert "core.hooksPath: add some protection while cloning"
  tests: verify that `clone -c core.hooksPath=/dev/null` works again
  hook(clone protections): add escape hatch
  hooks(clone protections): special-case current Git LFS hooks
  hooks(clone protections): simplify templates hooks validation
  Revert "Add a helper function to compare file contents"

 Documentation/config/safe.txt |   6 ++
 Makefile                      |   2 +-
 builtin/init-db.c             |   7 +++
 cache.h                       |  14 -----
 config.c                      |  13 +----
 copy.c                        |  58 --------------------
 hook.c                        | 100 +++++++++++++++++++++++++++-------
 hook.h                        |  10 ++++
 setup.c                       |   1 +
 t/helper/test-path-utils.c    |  10 ----
 t/t0060-path-utils.sh         |  41 --------------
 t/t1350-config-hooks-path.sh  |   4 ++
 t/t1800-hook.sh               |  40 ++++++++++----
 t/t5601-clone.sh              |  19 +++++++
 14 files changed, 158 insertions(+), 167 deletions(-)


base-commit: 47b6d90e91835082010da926f6a844d4441c57a6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1732%2Fdscho%2Fvarious-fixes-for-v2.45.1-and-friends-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1732/dscho/various-fixes-for-v2.45.1-and-friends-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1732

Comments

Junio C Hamano May 17, 2024, 11:52 p.m. UTC | #1
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> There have been a couple of issues that were reported about v2.45.1, and in
> addition I have noticed some myself:
>
>  * a memory leak in the clone protection logic
>  * a missed adjustment in the Makefile that leads to an incorrect templates
>    path in v2.39.4, v2.40.2 and v2.41.1 (but not in v2.42.2, ..., v2.45.1)
>  * an overzealous core.hooksPath check
>  * that Git LFS clone problem where it exits with an error (even if the
>    clone often succeeded...)

I thought brian expressed an interest in the issues these patches
attempt to address, so I thought it is helpful to Cc them to his
attention.

> This patch series is based on maint-2.39 to allow for (relatively) easy
> follow-up versions v2.39.5, ..., v2.45.2.

Thanks for basing them on the oldest version that is relevant.
Johannes Schindelin May 18, 2024, 12:02 a.m. UTC | #2
Hi Junio and brian,

On Fri, 17 May 2024, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > There have been a couple of issues that were reported about v2.45.1, and in
> > addition I have noticed some myself:
> >
> >  * a memory leak in the clone protection logic
> >  * a missed adjustment in the Makefile that leads to an incorrect templates
> >    path in v2.39.4, v2.40.2 and v2.41.1 (but not in v2.42.2, ..., v2.45.1)
> >  * an overzealous core.hooksPath check
> >  * that Git LFS clone problem where it exits with an error (even if the
> >    clone often succeeded...)
>
> I thought brian expressed an interest in the issues these patches
> attempt to address, so I thought it is helpful to Cc them to his
> attention.

oh my. I forgot to add the Cc (I guess I should have slept first, but I
wanted to get this out so that the Git LFS breakage as well as the other
breakages could be addressed as swiftly as possible)!

I really meant to Cc: you, brian, hoping for your substantial expertise
and kind code reviews to help get this landed soonish, in a shape that
makes Git better, and hopefully averts more breakages.

> > This patch series is based on maint-2.39 to allow for (relatively) easy
> > follow-up versions v2.39.5, ..., v2.45.2.
>
> Thanks for basing them on the oldest version that is relevant.

I also meant to provide `maint-*` branches but basically ran out of time.
Will work on that next week. I expect quite a few merge conflicts.

Ciao,
Johannes