<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-clone.txt, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-02-09T23:38:36Z</updated>
<entry>
<title>clone, submodule: pass partial clone filters to submodules</title>
<updated>2022-02-09T23:38:36Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2022-02-05T05:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f05da2b48b48a46db65fc768b3ffecaf996dd655'/>
<id>urn:sha1:f05da2b48b48a46db65fc768b3ffecaf996dd655</id>
<content type='text'>
When cloning a repo with a --filter and with --recurse-submodules
enabled, the partial clone filter only applies to the top-level repo.
This can lead to unexpected bandwidth and disk usage for projects which
include large submodules. For example, a user might wish to make a
partial clone of Gerrit and would run:
`git clone --recurse-submodules --filter=blob:5k https://gerrit.googlesource.com/gerrit`.
However, only the superproject would be a partial clone; all the
submodules would have all blobs downloaded regardless of their size.
With this change, the same filter can also be applied to submodules,
meaning the expected bandwidth and disk savings apply consistently.

To avoid changing default behavior, add a new clone flag,
`--also-filter-submodules`. When this is set along with `--filter` and
`--recurse-submodules`, the filter spec is passed along to git-submodule
and git-submodule--helper, such that submodule clones also have the
filter applied.

This applies the same filter to the superproject and all submodules.
Users who need to customize the filter per-submodule would need to clone
with `--no-recurse-submodules` and then manually initialize each
submodule with the proper filter.

Applying filters to submodules should be safe thanks to Jonathan Tan's
recent work [1, 2, 3] eliminating the use of alternates as a method of
accessing submodule objects, so any submodule object access now triggers
a lazy fetch from the submodule's promisor remote if the accessed object
is missing. This patch is a reworked version of [4], which was created
prior to Jonathan Tan's work.

[1]: 8721e2e (Merge branch 'jt/partial-clone-submodule-1', 2021-07-16)
[2]: 11e5d0a (Merge branch 'jt/grep-wo-submodule-odb-as-alternate',
	2021-09-20)
[3]: 162a13b (Merge branch 'jt/no-abuse-alternate-odb-for-submodules',
	2021-10-25)
[4]: https://lore.kernel.org/git/52bf9d45b8e2b72ff32aa773f2415bf7b2b86da2.1563322192.git.steadmon@google.com/

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/sparse-checkout-set'</title>
<updated>2022-01-04T00:24:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-04T00:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2dc94da3744bfbbf145eca587a0f5ff480cc5867'/>
<id>urn:sha1:2dc94da3744bfbbf145eca587a0f5ff480cc5867</id>
<content type='text'>
The "init" and "set" subcommands in "git sparse-checkout" have been
unified for a better user experience and performance.

* en/sparse-checkout-set:
  sparse-checkout: remove stray trailing space
  clone: avoid using deprecated `sparse-checkout init`
  Documentation: clarify/correct a few sparsity related statements
  git-sparse-checkout.txt: update to document init/set/reapply changes
  sparse-checkout: enable reapply to take --[no-]{cone,sparse-index}
  sparse-checkout: enable `set` to initialize sparse-checkout mode
  sparse-checkout: split out code for tweaking settings config
  sparse-checkout: disallow --no-stdin as an argument to set
  sparse-checkout: add sanity-checks on initial sparsity state
  sparse-checkout: break apart functions for sparse_checkout_(set|add)
  sparse-checkout: pass use_stdin as a parameter instead of as a global
</content>
</entry>
<entry>
<title>Documentation: clarify/correct a few sparsity related statements</title>
<updated>2021-12-15T19:48:22Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-12-14T04:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d30e2bbe85d8a7427d5c978264f45d498a472408'/>
<id>urn:sha1:d30e2bbe85d8a7427d5c978264f45d498a472408</id>
<content type='text'>
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Victoria Dye &lt;vdye@github.com&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: use only hyphens as word separators in placeholders</title>
<updated>2021-11-09T17:39:11Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2021-11-06T18:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=133db54dabd2174960d4a7449a1a7ed574ea0ad3'/>
<id>urn:sha1:133db54dabd2174960d4a7449a1a7ed574ea0ad3</id>
<content type='text'>
According to CodingGuidelines, multi-word placeholders should use
hyphens as word separators.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Reviewed-by: Eli Schwartz &lt;eschwartz@archlinux.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/clone.c: add --reject-shallow option</title>
<updated>2021-04-01T19:58:58Z</updated>
<author>
<name>Li Linchao</name>
<email>lilinchao@oschina.cn</email>
</author>
<published>2021-04-01T10:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4fe788b1b0ee6150173580d8fa70e7d5788cf7d3'/>
<id>urn:sha1:4fe788b1b0ee6150173580d8fa70e7d5788cf7d3</id>
<content type='text'>
In some scenarios, users may want more history than the repository
offered for cloning, which happens to be a shallow repository, can
give them. But because users don't know it is a shallow repository
until they download it to local, we may want to refuse to clone
this kind of repository, without creating any unnecessary files.

The '--depth=x' option cannot be used as a solution; the source may
be deep enough to give us 'x' commits when cloned, but the user may
later need to deepen the history to arbitrary depth.

Teach '--reject-shallow' option to "git clone" to abort as soon as
we find out that we are cloning from a shallow repository.

Signed-off-by: Li Linchao &lt;lilinchao@oschina.cn&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation/git-clone.txt: document race with --local</title>
<updated>2021-01-12T06:03:08Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2021-01-11T19:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4a1ca22ef913adf3de9e72e525a2cd436742009'/>
<id>urn:sha1:a4a1ca22ef913adf3de9e72e525a2cd436742009</id>
<content type='text'>
When running 'git clone --local', the operation may fail if another
process is modifying the source repository. Document that this race
condition is known to hopefully help anyone who may run into it.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/clone-origin'</title>
<updated>2020-10-27T22:09:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-27T22:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40696c67274305d6258539de5a36649cf833f712'/>
<id>urn:sha1:40696c67274305d6258539de5a36649cf833f712</id>
<content type='text'>
"git clone" learned clone.defaultremotename configuration variable
to customize what nickname to use to call the remote the repository
was cloned from.

* sb/clone-origin:
  clone: allow configurable default for `-o`/`--origin`
  clone: read new remote name from remote_name instead of option_origin
  clone: validate --origin option before use
  refs: consolidate remote name validation
  remote: add tests for add and rename with invalid names
  clone: use more conventional config/option layering
  clone: add tests for --template and some disallowed option pairs
</content>
</entry>
<entry>
<title>clone: allow configurable default for `-o`/`--origin`</title>
<updated>2020-10-01T05:09:13Z</updated>
<author>
<name>Sean Barag</name>
<email>sean@barag.org</email>
</author>
<published>2020-10-01T03:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de9ed3ef3740f8227cc924e845032954d1f1b1b7'/>
<id>urn:sha1:de9ed3ef3740f8227cc924e845032954d1f1b1b7</id>
<content type='text'>
While the default remote name of "origin" can be changed at clone-time
with `git clone`'s `--origin` option, it was previously not possible
to specify a default value for the name of that remote.  Add support for
a new `clone.defaultRemoteName` config, with the newly-created remote
name resolved in priority order:

1. (Highest priority) A remote name passed directly to `git clone -o`
2. A `clone.defaultRemoteName=new_name` in config `git clone -c`
3. A `clone.defaultRemoteName` value set in `/path/to/template/config`,
   where `--template=/path/to/template` is provided
4. A `clone.defaultRemoteName` value set in a non-template config file
5. The default value of `origin`

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Helped-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Helped-by: Andrei Rybak &lt;rybak.a.v@gmail.com&gt;
Signed-off-by: Sean Barag &lt;sean@barag.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>maintenance: replace run_auto_gc()</title>
<updated>2020-09-17T18:30:05Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2020-09-17T18:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a95ce124305adcc4980241b8877e06db1d6ed411'/>
<id>urn:sha1:a95ce124305adcc4980241b8877e06db1d6ed411</id>
<content type='text'>
The run_auto_gc() method is used in several places to trigger a check
for repo maintenance after some Git commands, such as 'git commit' or
'git fetch'.

To allow for extra customization of this maintenance activity, replace
the 'git gc --auto [--quiet]' call with one to 'git maintenance run
--auto [--quiet]'. As we extend the maintenance builtin with other
steps, users will be able to select different maintenance activities.

Rename run_auto_gc() to run_auto_maintenance() to be clearer what is
happening on this call, and to expose all callers in the current diff.
Rewrite the method to use a struct child_process to simplify the calls
slightly.

Since 'git fetch' already allows disabling the 'git gc --auto'
subprocess, add an equivalent option with a different name to be more
descriptive of the new behavior: '--[no-]maintenance'. Update the
documentation to include these options at the same time.

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>docs: add missing diamond brackets</title>
<updated>2020-06-24T16:14:21Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-06-24T14:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6069eccdc9d6351f1668b85551bbee4b6ca7cbb0'/>
<id>urn:sha1:6069eccdc9d6351f1668b85551bbee4b6ca7cbb0</id>
<content type='text'>
There were a couple of instances in our manual pages that had an
opening diamond bracket without a corresponding closing one.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
