<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-11-30T21:44:15Z</updated>
<entry>
<title>maintenance: fix SEGFAULT when no repository</title>
<updated>2020-11-30T21:44:15Z</updated>
<author>
<name>Rafael Silva</name>
<email>rafaeloliveira.cs@gmail.com</email>
</author>
<published>2020-11-26T20:41:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e72f7defc4f454cc7ad512d9a16a78b83f2606d8'/>
<id>urn:sha1:e72f7defc4f454cc7ad512d9a16a78b83f2606d8</id>
<content type='text'>
The "git maintenance run" and "git maintenance start/stop" commands
holds a file-based lock at the .git/maintenance.lock and
.git/schedule.lock respectively. These locks are used to ensure only
one maintenance process is executed at the time as both operations
involves writing data into the git repository.

The path to the lock file is built using
"the_repository-&gt;objects-&gt;odb-&gt;path" that results in SEGFAULT when we
have no repository available as "the_repository-&gt;objects-&gt;odb" is
set to NULL.

Let's teach maintenance command to use RUN_SETUP option that will
provide the validation and fail when running outside of a repository.
Hence fixing the SEGFAULT for all three operations and making the
behaviour consistent across all subcommands.

Setting the RUN_SETUP also provides the same protection for all
subcommands given that the "register" and "unregister" also requires to
be executed inside a repository.

Furthermore let's remove the local validation implemented by the
"register" and "unregister" as this will not be required anymore with
the new option.

Signed-off-by: Rafael Silva &lt;rafaeloliveira.cs@gmail.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/maintenance-part-3'</title>
<updated>2020-11-18T21:32:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-18T21:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7660da161821ab79b8ecd5019c28843ed7e770a6'/>
<id>urn:sha1:7660da161821ab79b8ecd5019c28843ed7e770a6</id>
<content type='text'>
Parts of "git maintenance" to ease writing crontab entries (and
other scheduling system configuration) for it.

* ds/maintenance-part-3:
  maintenance: add troubleshooting guide to docs
  maintenance: use 'incremental' strategy by default
  maintenance: create maintenance.strategy config
  maintenance: add start/stop subcommands
  maintenance: add [un]register subcommands
  for-each-repo: run subcommands on configured repos
  maintenance: add --schedule option and config
  maintenance: optionally skip --auto process
</content>
</entry>
<entry>
<title>Merge branch 'js/no-builtins-on-disk-option'</title>
<updated>2020-10-09T04:53:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-09T04:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86e1007abc58f8458ce90dc10a385239722cf08a'/>
<id>urn:sha1:86e1007abc58f8458ce90dc10a385239722cf08a</id>
<content type='text'>
Hotfix to breakage introduced in the topic in v2.29-rc0

* js/no-builtins-on-disk-option:
  help: do not expect built-in commands to be hardlinked
</content>
</entry>
<entry>
<title>help: do not expect built-in commands to be hardlinked</title>
<updated>2020-10-07T22:25:10Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-10-07T21:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=722fc374914d4f9b37d42a8eda603eecb790f64c'/>
<id>urn:sha1:722fc374914d4f9b37d42a8eda603eecb790f64c</id>
<content type='text'>
When building with SKIP_DASHED_BUILT_INS=YesPlease, the built-in
commands are no longer present in the `PATH` as hardlinks to `git`.

As a consequence, `load_command_list()` needs to be taught to find the
names of the built-in commands from elsewhere.

This only affected the output of `git --list-cmds=main`, but not the
output of `git help -a` because the latter includes the built-in
commands by virtue of them being listed in command-list.txt.

The bug was detected via a patch series that turns the merge strategies
included in Git into built-in commands: `git merge -s help` relies on
`load_command_list()` to determine the list of available merge
strategies.

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>Merge branch 'ds/maintenance-part-1'</title>
<updated>2020-09-25T22:25:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-25T22:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=48794acc50f14394ca6c4f5092a4a498f409f350'/>
<id>urn:sha1:48794acc50f14394ca6c4f5092a4a498f409f350</id>
<content type='text'>
A "git gc"'s big brother has been introduced to take care of more
repository maintenance tasks, not limited to the object database
cleaning.

* ds/maintenance-part-1:
  maintenance: add trace2 regions for task execution
  maintenance: add auto condition for commit-graph task
  maintenance: use pointers to check --auto
  maintenance: create maintenance.&lt;task&gt;.enabled config
  maintenance: take a lock on the objects directory
  maintenance: add --task option
  maintenance: add commit-graph task
  maintenance: initialize task array
  maintenance: replace run_auto_gc()
  maintenance: add --quiet option
  maintenance: create basic maintenance runner
</content>
</entry>
<entry>
<title>for-each-repo: run subcommands on configured repos</title>
<updated>2020-09-25T17:59:44Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2020-09-11T17:49:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4950b2a2b5c4731e4c9d5b803739a6979b23fed6'/>
<id>urn:sha1:4950b2a2b5c4731e4c9d5b803739a6979b23fed6</id>
<content type='text'>
It can be helpful to store a list of repositories in global or system
config and then iterate Git commands on that list. Create a new builtin
that makes this process simple for experts. We will use this builtin to
run scheduled maintenance on all configured repositories in a future
change.

The test is very simple, but does highlight that the "--" argument is
optional.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>maintenance: create basic maintenance runner</title>
<updated>2020-09-17T18:30:04Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2020-09-17T18:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2057d75038541cd16debb1c55f3f897fd244965c'/>
<id>urn:sha1:2057d75038541cd16debb1c55f3f897fd244965c</id>
<content type='text'>
The 'gc' builtin is our current entrypoint for automatically maintaining
a repository. This one tool does many operations, such as repacking the
repository, packing refs, and rewriting the commit-graph file. The name
implies it performs "garbage collection" which means several different
things, and some users may not want to use this operation that rewrites
the entire object database.

Create a new 'maintenance' builtin that will become a more general-
purpose command. To start, it will only support the 'run' subcommand,
but will later expand to add subcommands for scheduling maintenance in
the background.

For now, the 'maintenance' builtin is a thin shim over the 'gc' builtin.
In fact, the only option is the '--auto' toggle, which is handed
directly to the 'gc' builtin. The current change is isolated to this
simple operation to prevent more interesting logic from being lost in
all of the boilerplate of adding a new builtin.

Use existing builtin/gc.c file because we want to share code between the
two builtins. It is possible that we will have 'maintenance' replace the
'gc' builtin entirely at some point, leaving 'git gc' as an alias for
some specific arguments to 'git maintenance run'.

Create a new test_subcommand helper that allows us to test if a certain
subcommand was run. It requires storing the GIT_TRACE2_EVENT logs in a
file. A negation mode is available that will be used in later tests.

Helped-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>make git-fast-import a builtin</title>
<updated>2020-08-13T18:02:13Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-08-13T14:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a006f875e2689cb7df543d5950beadb0416d305b'/>
<id>urn:sha1:a006f875e2689cb7df543d5950beadb0416d305b</id>
<content type='text'>
There's no reason that git-fast-import benefits from being a separate
binary. And as it links against libgit.a, it has a non-trivial disk
footprint. Let's make it a builtin, which reduces the size of a stripped
installation from 22MB to 21MB.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>make git-bugreport a builtin</title>
<updated>2020-08-13T18:02:12Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-08-13T14:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d7a5649c82dfa83ba8d0253e4140f242dca859a7'/>
<id>urn:sha1:d7a5649c82dfa83ba8d0253e4140f242dca859a7</id>
<content type='text'>
There's no reason that bugreport has to be a separate binary. And since
it links against libgit.a, it has a rather large disk footprint. Let's
make it a builtin, which reduces the size of a stripped installation
from 24MB to 22MB.

This also simplifies our Makefile a bit. And we can take advantage of
builtin niceties like RUN_SETUP_GENTLY.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>make credential helpers builtins</title>
<updated>2020-08-13T18:02:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-08-13T14:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5dd96b70aca364f163f0b3743418779cfe062e6'/>
<id>urn:sha1:b5dd96b70aca364f163f0b3743418779cfe062e6</id>
<content type='text'>
There's no real reason for credential helpers to be separate binaries. I
did them this way originally under the notion that helper don't _need_
to be part of Git, and so can be built totally separately (and indeed,
the ones in contrib/credential are). But the ones in our main Makefile
build on libgit.a, and the resulting binaries are reasonably large.

We can slim down our total disk footprint by just making them builtins.
This reduces the size of:

  make strip install

from 29MB to 24MB on my Debian system.

Note that credential-cache can't operate without support for Unix
sockets. Currently we just don't build it at all when NO_UNIX_SOCKETS is
set. We could continue that with conditionals in the Makefile and our
list of builtins. But instead, let's build a dummy implementation that
dies with an informative message. That has two advantages:

  - it's simpler, because the conditional bits are all kept inside
    the credential-cache source

  - a user who is expecting it to exist will be told _why_ they can't
    use it, rather than getting the "credential-cache is not a git
    command" error which makes it look like the Git install is broken.

Note that our dummy implementation does still respond to "-h" in order
to appease t0012 (and this may be a little friendlier for users, as
well).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
