<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.46.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.46.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.46.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-06-14T17:26:33Z</updated>
<entry>
<title>global: introduce `USE_THE_REPOSITORY_VARIABLE` macro</title>
<updated>2024-06-14T17:26:33Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-14T06:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7da9385708accf518a80a1e17969020fb361048'/>
<id>urn:sha1:e7da9385708accf518a80a1e17969020fb361048</id>
<content type='text'>
Use of the `the_repository` variable is deprecated nowadays, and we
slowly but steadily convert the codebase to not use it anymore. Instead,
callers should be passing down the repository to work on via parameters.

It is hard though to prove that a given code unit does not use this
variable anymore. The most trivial case, merely demonstrating that there
is no direct use of `the_repository`, is already a bit of a pain during
code reviews as the reviewer needs to manually verify claims made by the
patch author. The bigger problem though is that we have many interfaces
that implicitly rely on `the_repository`.

Introduce a new `USE_THE_REPOSITORY_VARIABLE` macro that allows code
units to opt into usage of `the_repository`. The intent of this macro is
to demonstrate that a certain code unit does not use this variable
anymore, and to keep it from new dependencies on it in future changes,
be it explicit or implicit

For now, the macro only guards `the_repository` itself as well as
`the_hash_algo`. There are many more known interfaces where we have an
implicit dependency on `the_repository`, but those are not guarded at
the current point in time. Over time though, we should start to add
guards as required (or even better, just remove them).

Define the macro as required in our code units. As expected, most of our
code still relies on the global variable. Nearly all of our builtins
rely on the variable as there is no way yet to pass `the_repository` to
their entry point. For now, declare the macro in "biultin.h" to keep the
required changes at least a little bit more contained.

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>builtin/refs: new command to migrate ref storage formats</title>
<updated>2024-06-06T16:04:34Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-06T05:29:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25a0023f28600102f54e7529c20da5928c3e9c75'/>
<id>urn:sha1:25a0023f28600102f54e7529c20da5928c3e9c75</id>
<content type='text'>
Introduce a new command that allows the user to migrate a repository
between ref storage formats. This new command is implemented as part of
a new git-refs(1) executable. This is due to two reasons:

  - There is no good place to put the migration logic in existing
    commands. git-maintenance(1) felt unwieldy, and git-pack-refs(1) is
    not the correct place to put it, either.

  - I had it in my mind to create a new low-level command for accessing
    refs for quite a while already. git-refs(1) is that command and can
    over time grow more functionality relating to refs. This should help
    discoverability by consolidating low-level access to refs into a
    single executable.

As mentioned in the preceding commit that introduces the ref storage
format migration logic, the new `git refs migrate` command still has a
bunch of restrictions. These restrictions are documented accordingly.

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>advice: add --no-advice global option</title>
<updated>2024-05-03T17:36:59Z</updated>
<author>
<name>James Liu</name>
<email>james@jamesliu.io</email>
</author>
<published>2024-05-03T07:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b79deeb55444f9e01a3f6335d7e0507e23e90190'/>
<id>urn:sha1:b79deeb55444f9e01a3f6335d7e0507e23e90190</id>
<content type='text'>
Advice hints must be disabled individually by setting the relevant
advice.* variables to false in the Git configuration. For server-side
and scripted usages of Git where hints can be a hindrance, it can be
cumbersome to maintain configuration to ensure all advice hints are
disabled in perpetuity. This is a particular concern in tests, where
new or changed hints can result in failed assertions.

Add a --no-advice global option to disable all advice hints from being
displayed. This is independent of the toggles for individual advice
hints. Use an internal environment variable (GIT_ADVICE) to ensure this
configuration is propagated to the usage site, even if it executes in a
subprocess.

Signed-off-by: James Liu &lt;james@jamesliu.io&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: clean up usage documentation for --no-* opts</title>
<updated>2024-05-03T17:32:06Z</updated>
<author>
<name>James Liu</name>
<email>james@jamesliu.io</email>
</author>
<published>2024-05-03T07:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b715ad92609f9b4ad12fa76ac649954ccdd119a'/>
<id>urn:sha1:9b715ad92609f9b4ad12fa76ac649954ccdd119a</id>
<content type='text'>
We'll be adding another option to the --no-* class of options soon.

Clean up the existing options by grouping them together in the OPTIONS
section, and adding missing ones to the SYNOPSIS.

Signed-off-by: James Liu &lt;james@jamesliu.io&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/trace2-missing-def-param-fix'</title>
<updated>2024-03-18T20:04:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-03-18T20:04:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f1e92643d9a74857bddc12280b511b7e06c08a7'/>
<id>urn:sha1:7f1e92643d9a74857bddc12280b511b7e06c08a7</id>
<content type='text'>
Some trace2 events that lacked def_param have learned to show it,
enriching the output.

Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
cf. &lt;ZejkVOVQBZhLVfHW@google.com&gt;

* jh/trace2-missing-def-param-fix:
  trace2: emit 'def_param' set with 'cmd_name' event
  trace2: avoid emitting 'def_param' set more than once
  t0211: demonstrate missing 'def_param' events for certain commands
</content>
</entry>
<entry>
<title>Merge branch 'jc/no-lazy-fetch'</title>
<updated>2024-03-07T23:59:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-03-07T23:59:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c206fc82abb3ae3d8a5fb5b3c07c1a933007f31'/>
<id>urn:sha1:2c206fc82abb3ae3d8a5fb5b3c07c1a933007f31</id>
<content type='text'>
"git --no-lazy-fetch cmd" allows to run "cmd" while disabling lazy
fetching of objects from the promisor remote, which may be handy
for debugging.

* jc/no-lazy-fetch:
  git: extend --no-lazy-fetch to work across subprocesses
  git: document GIT_NO_REPLACE_OBJECTS environment variable
  git: --no-lazy-fetch option
</content>
</entry>
<entry>
<title>trace2: emit 'def_param' set with 'cmd_name' event</title>
<updated>2024-03-07T18:24:34Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhostetler@github.com</email>
</author>
<published>2024-03-07T15:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6111252cbf21abb175411da5c5a2cde65bb8f3e9'/>
<id>urn:sha1:6111252cbf21abb175411da5c5a2cde65bb8f3e9</id>
<content type='text'>
Some commands do not cause a set of 'def_param' events to be emitted.
This includes "git-remote-https", "git-http-fetch", and various
"query" commands, like "git --man-path".

Since all of these commands do emit a 'cmd_name' event, add code to
the "trace2_cmd_name()" function to generate the set of 'def_param'
events.

Remove explicit calls to "trace2_cmd_list_config()" and
"trace2_cmd_list_env_vars()" in git.c since they are no longer needed.

Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Jeff Hostetler &lt;jeffhostetler@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git: extend --no-lazy-fetch to work across subprocesses</title>
<updated>2024-02-27T17:53:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-27T16:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6d5479e7ac301ae8d11daa3d8ef748e891c91c3'/>
<id>urn:sha1:e6d5479e7ac301ae8d11daa3d8ef748e891c91c3</id>
<content type='text'>
Modeling after how the `--no-replace-objects` option is made usable
across subprocess spawning (e.g., cURL based remote helpers are
spawned as a separate process while running "git fetch"), allow the
`--no-lazy-fetch` option to be passed across process boundaries.

Do not model how the value of GIT_NO_REPLACE_OBJECTS environment
variable is ignored, though.  Just use the usual git_env_bool() to
allow "export GIT_NO_LAZY_FETCH=0" and "unset GIT_NO_LAZY_FETCH"
to be equivalents.

Also do not model how the request is not propagated to subprocesses
we spawn (e.g. "git clone --local" that spawns a new process to work
in the origin repository, while the original one working in the
newly created one) by the "--no-replace-objects" option, as this "do
not lazily fetch from the promisor" is more about a per-request
debugging aid, not "this repository's promisor should not be relied
upon" property specific to a repository.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git: --no-lazy-fetch option</title>
<updated>2024-02-13T20:53:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-08T23:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c784b0a5b991cc8ee179b8f3a8fc0b762708947d'/>
<id>urn:sha1:c784b0a5b991cc8ee179b8f3a8fc0b762708947d</id>
<content type='text'>
Sometimes, especially during tests of low level machinery, it is
handy to have a way to disable lazy fetching of objects.  This
allows us to say, for example, "git cat-file -e &lt;object-name&gt;", to
see if the object is locally available.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replay: introduce new builtin</title>
<updated>2023-11-26T01:10:48Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-11-24T11:10:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f920b0289ba3971451a1cd478baa1d4fddbb0a0b'/>
<id>urn:sha1:f920b0289ba3971451a1cd478baa1d4fddbb0a0b</id>
<content type='text'>
For now, this is just a rename from `t/helper/test-fast-rebase.c` into
`builtin/replay.c` with minimal changes to make it build appropriately.

Let's add a stub documentation and a stub test script though.

Subsequent commits will flesh out the capabilities of the new command
and make it a more standard regular builtin.

Helped-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Co-authored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
