<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/environment.c, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-05-05T21:56:24Z</updated>
<entry>
<title>Merge branch 'js/windows-arm64'</title>
<updated>2025-05-05T21:56:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-05-05T21:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b50795db7969712ef937906d548fe9eb58cb9fb5'/>
<id>urn:sha1:b50795db7969712ef937906d548fe9eb58cb9fb5</id>
<content type='text'>
Update to arm64 Windows port.

* js/windows-arm64:
  max_tree_depth: lower it for clangarm64 on Windows
  mingw(arm64): do move the `/etc/git*` location
  msvc: do handle builds on Windows/ARM64
  mingw: do not use nedmalloc on Windows/ARM64
  config.mak.uname: add support for clangarm64
  bswap.h: add support for built-in bswap functions
</content>
</entry>
<entry>
<title>Merge branch 'as/typofix-in-env-h-header'</title>
<updated>2025-04-29T21:21:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-29T21:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd45c2e48f79020891bd2375de245ba215ce3826'/>
<id>urn:sha1:dd45c2e48f79020891bd2375de245ba215ce3826</id>
<content type='text'>
Typofix.

* as/typofix-in-env-h-header:
  environment: fix typo: 'setup_git_directory_gently'
</content>
</entry>
<entry>
<title>max_tree_depth: lower it for clangarm64 on Windows</title>
<updated>2025-04-23T16:16:24Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2025-04-23T08:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=436a42215e51fa2f8b74d128472d7d9bfe2595e1'/>
<id>urn:sha1:436a42215e51fa2f8b74d128472d7d9bfe2595e1</id>
<content type='text'>
Just as in b64d78ad02ca (max_tree_depth: lower it for MSVC to avoid
stack overflows, 2023-11-01), I encountered the same problem with the
clang builds on Windows/ARM64.

The symptom is an exit code 127 when t6700 tries to verify that `git
archive big` fails.

This exit code is reserved on Unix/Linux to mean "command not found".
Unfortunately in this case, it is the fall-back chosen by
Cygwin's `pinfo::status_exit()` method when encountering
the NSTATUS `STATUS_STACK_OVERFLOW`, see
https://github.com/cygwin/cygwin/blob/cygwin-3.6.1/winsup/cygwin/pinfo.cc#L171

I verified manually that the stack overflow always happens somewhere
around tree depth 1403, therefore 1280 should be a safe bound in these
instances.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>environment: fix typo: 'setup_git_directory_gently'</title>
<updated>2025-04-18T21:04:08Z</updated>
<author>
<name>Abhijeet Sonar</name>
<email>abhijeet.nkt@gmail.com</email>
</author>
<published>2025-04-18T18:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff4a7493542df81b0786e257fd84fd9ee82e2e38'/>
<id>urn:sha1:ff4a7493542df81b0786e257fd84fd9ee82e2e38</id>
<content type='text'>
Above the declaration of git_work_tree_cfg, we have:

  /* This is set by setup_git_dir_gently() and/or git_default_config() */
  char *git_work_tree_cfg;

It can be verified that there is no function called
'setup_git_dir_gently' by running grep on the codebase:

  $ grep -R setup_git_dir_gently .
  ./environment.c:/* This is set by setup_git_dir_gently() and/or git_default_config() */

The comment, introduced in e90fdc39b6 (Clean up work-tree handling), is
the only occurrence of the name 'setup_git_dir_gently'.

It probably meant 'setup_git_directory_gently' as that is a name of a
real function in setup.c. Correct it.

Signed-off-by: Abhijeet Sonar &lt;abhijeet.nkt@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>environment: move access to "core.bigFileThreshold" into repo settings</title>
<updated>2025-03-10T20:16:18Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-03-10T07:13:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7835ee75cdffbce925246cbacc83e8b4a932a681'/>
<id>urn:sha1:7835ee75cdffbce925246cbacc83e8b4a932a681</id>
<content type='text'>
The "core.bigFileThreshold" setting is stored in a global variable and
populated via `git_default_core_config()`. This may cause issues in
the case where one is handling multiple different repositories in a
single process with different values for that config key, as we may or
may not see the correct value in that case. Furthermore, global state
blocks our path towards libification.

Refactor the code so that we instead store the value in `struct
repo_settings`, where the value is computed as-needed and cached.

Note that this change requires us to adapt one test in t1050 that
verifies that we die when parsing an invalid "core.bigFileThreshold"
value. The exercised Git command doesn't use the value at all, and thus
it won't hit the new code path that parses the value. This is addressed
by using git-hash-object(1) instead, which does read the value.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/path-sans-the-repository'</title>
<updated>2025-03-05T18:37:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-03-05T18:37:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=feffb34257ee8eef18cc6a3a5a4f01d40720bda1'/>
<id>urn:sha1:feffb34257ee8eef18cc6a3a5a4f01d40720bda1</id>
<content type='text'>
The path.[ch] API takes an explicit repository parameter passed
throughout the callchain, instead of relying on the_repository
singleton instance.

* ps/path-sans-the-repository:
  path: adjust last remaining users of `the_repository`
  environment: move access to "core.sharedRepository" into repo settings
  environment: move access to "core.hooksPath" into repo settings
  repo-settings: introduce function to clear struct
  path: drop `git_path()` in favor of `repo_git_path()`
  rerere: let `rerere_path()` write paths into a caller-provided buffer
  path: drop `git_common_path()` in favor of `repo_common_path()`
  worktree: return allocated string from `get_worktree_git_dir()`
  path: drop `git_path_buf()` in favor of `repo_git_path_replace()`
  path: drop `git_pathdup()` in favor of `repo_git_path()`
  path: drop unused `strbuf_git_path()` function
  path: refactor `repo_submodule_path()` family of functions
  submodule: refactor `submodule_to_gitdir()` to accept a repo
  path: refactor `repo_worktree_path()` family of functions
  path: refactor `repo_git_path()` family of functions
  path: refactor `repo_common_path()` family of functions
</content>
</entry>
<entry>
<title>environment: move access to "core.sharedRepository" into repo settings</title>
<updated>2025-02-28T21:54:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-02-07T11:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1ce861c34bffbc02998173016b0bca0f6d9f6c4'/>
<id>urn:sha1:f1ce861c34bffbc02998173016b0bca0f6d9f6c4</id>
<content type='text'>
Similar as with the preceding commit, we track "core.sharedRepository"
via a pair of global variables. Move them into `struct repo_settings` so
that we can instead track them per-repository.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>environment: move access to "core.hooksPath" into repo settings</title>
<updated>2025-02-28T21:54:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-02-07T11:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f3fbed8eda577703426d77dacc71ce0ba46634e'/>
<id>urn:sha1:6f3fbed8eda577703426d77dacc71ce0ba46634e</id>
<content type='text'>
The "core.hooksPath" setting is stored in a global variable and
populated via the `git_default_core_config`. This may cause issues in
the case where one is handling multiple different repositories in a
single process with different values for that config key, as we may or
may not see the correct value in that case. Furthermore, global state
blocks our path towards libification.

Refactor the code so that we instead store the value in `struct
repo_settings`. The value is computed as-needed and cached. The result
should be functionally the same as there aren't ever any code paths
where we'd execute hooks outside the context of a repository.

Note that this requires us to change the passed-in repository in the
`repo_git_path()` family of functions to be non-constant, as we call
`adjust_git_path()` there.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-compat-util: move include of "compat/zlib.h" into "git-zlib.h"</title>
<updated>2025-01-28T21:03:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-01-28T08:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41f1a8435a900b660b7a6bc9da8dce2665e4b70a'/>
<id>urn:sha1:41f1a8435a900b660b7a6bc9da8dce2665e4b70a</id>
<content type='text'>
We include "compat/zlib.h" in "git-compat-util.h", which is
unnecessarily broad given that we only have a small handful of files
that use the zlib library. Move the header into "git-zlib.h" instead and
adapt users of zlib to include that header.

One exception is the reftable library, as we don't want to use the
Git-specific wrapper of zlib there, so we include "compat/zlib.h"
instead. Furthermore, we move the include into "reftable/system.h" so
that users of the library other than Git can wire up zlib themselves.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: make `packed_git_(limit|window_size)` non-global variables</title>
<updated>2024-12-03T23:21:55Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2024-12-03T14:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d284713bae71877577cf1a07501c8528f8c44bb2'/>
<id>urn:sha1:d284713bae71877577cf1a07501c8528f8c44bb2</id>
<content type='text'>
The variables `packed_git_window_size` and `packed_git_limit` are global
config variables used in the `packfile.c` file. Since it is only used in
this file, let's change it from being a global config variable to a
local variable for the subsystem.

With this, we rid `packfile.c` from all global variable usage and this
means we can also remove the `USE_THE_REPOSITORY_VARIABLE` guard from
the file.

Helped-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
