<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-clone.txt, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-04-11T15:46:09Z</updated>
<entry>
<title>clone: error specifically with --local and symlinked objects</title>
<updated>2023-04-11T15:46:09Z</updated>
<author>
<name>Glen Choo</name>
<email>chooglen@google.com</email>
</author>
<published>2023-04-10T22:18:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e33535ea98ac16d2163e8e9fcbba5e015881e65'/>
<id>urn:sha1:4e33535ea98ac16d2163e8e9fcbba5e015881e65</id>
<content type='text'>
6f054f9fb3 (builtin/clone.c: disallow --local clones with
symlinks, 2022-07-28) gives a good error message when "git clone
--local" fails when the repo to clone has symlinks in
"$GIT_DIR/objects". In bffc762f87 (dir-iterator: prevent top-level
symlinks without FOLLOW_SYMLINKS, 2023-01-24), we later extended this
restriction to the case where "$GIT_DIR/objects" is itself a symlink,
but we didn't update the error message then - bffc762f87's tests show
that we print a generic "failed to start iterator over" message.

This is exacerbated by the fact that Documentation/git-clone.txt
mentions neither restriction, so users are left wondering if this is
intentional behavior or not.

Fix this by adding a check to builtin/clone.c: when doing a local clone,
perform an extra check to see if "$GIT_DIR/objects" is a symlink, and if
so, assume that that was the reason for the failure and report the
relevant information. Ideally, dir_iterator_begin() would tell us that
the real failure reason is the presence of the symlink, but (as far as I
can tell) there isn't an appropriate errno value for that.

Also, update Documentation/git-clone.txt to reflect that this
restriction exists.

Signed-off-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/dedup-config-and-command-docs'</title>
<updated>2022-09-14T19:56:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-09-14T19:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a54d740451c1438b4db009bf2ebe1669c280ef8'/>
<id>urn:sha1:7a54d740451c1438b4db009bf2ebe1669c280ef8</id>
<content type='text'>
Share the text used to explain configuration variables used by "git
&lt;subcmd&gt;" in "git help &lt;subcmd&gt;" with the text from "git help config".

* ab/dedup-config-and-command-docs:
  docs: add CONFIGURATION sections that fuzzy map to built-ins
  docs: add CONFIGURATION sections that map to a built-in
  log docs: de-duplicate configuration sections
  difftool docs: de-duplicate configuration sections
  notes docs: de-duplicate and combine configuration sections
  apply docs: de-duplicate configuration sections
  send-email docs: de-duplicate configuration sections
  grep docs: de-duplicate configuration sections
  docs: add and use include template for config/* includes
</content>
</entry>
<entry>
<title>docs: add CONFIGURATION sections that fuzzy map to built-ins</title>
<updated>2022-09-07T16:46:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-09-07T08:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9274dea3d95365c1ed0cd5ef46a9b677ae5c478f'/>
<id>urn:sha1:9274dea3d95365c1ed0cd5ef46a9b677ae5c478f</id>
<content type='text'>
Add a CONFIGURATION section to the documentation of various built-ins,
for those cases where the relevant config/NAME.txt doesn't map only to
one git-NAME.txt. In particular:

 * config/blame.txt: used by git-{blame,annotate}.txt. Since the
   git-annotate(1) documentation refers to git-blame(1) don't add a
   "CONFIGURATION" section to git-annotate(1), only to git-blame(1).

 * config/checkout.txt: maps to both git-checkout.txt and
   git-switch.txt (but nothing else).

 * config/init.txt: should be included in git-init(1) and
   git-clone(1).

 * config/column.txt: We should ideally mention the relevant subset of
   this in git-{branch,clean,status,tag}.txt, but let's punt on it for
   now. We will when we eventually split these sort of files into
   e.g. config/column.txt and
   config/column/{branch,clean,status,tag}.txt, with the former
   including the latter set.

Things that are being left out, and why:

 * config/{remote,remotes,credential}.txt: Configuration that affects
   how we talk to remote repositories is harder to untangle. We'll need
   to include some of this in git-{fetch,remote,push,ls-remote}.txt
   etc., but some of those only use a small subset of these
   options. Let's leave this for now.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Reviewed-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: add CONFIGURATION sections that map to a built-in</title>
<updated>2022-09-07T16:46:06Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-09-07T08:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16f6b0d1aa598d665ada827cf89bda2112853680'/>
<id>urn:sha1:16f6b0d1aa598d665ada827cf89bda2112853680</id>
<content type='text'>
Add a CONFIGURATION section to the documentation of various built-ins,
for those cases where the relevant config/NAME.txt describes
configuration that is only used by the relevant built-in documented in
git-NAME.txt. Subsequent commits will handle more complex cases.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Reviewed-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: --bundle-uri cannot be combined with --depth</title>
<updated>2022-08-10T21:07:37Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-08-09T13:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e21e663cd1942df29979d3e01f7eacb532727bb7'/>
<id>urn:sha1:e21e663cd1942df29979d3e01f7eacb532727bb7</id>
<content type='text'>
A previous change added the '--bundle-uri' option, but did not check
if the --depth parameter was included. Since bundles are not compatible
with shallow clones, provide an error message to the user who is
attempting this combination.

I am leaving this as its own change, separate from the one that
implements '--bundle-uri', because this is more of an advisory for the
user. There is nothing wrong with bootstrapping with bundles and then
fetching a shallow clone. However, that is likely going to involve too
much work for the client _and_ the server. The client will download all
of this bundle information containing the full history of the
repository only to ignore most of it. The server will get a shallow
fetch request, but with a list of haves that might cause a more painful
computation of that shallow pack-file.

Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: add --bundle-uri option</title>
<updated>2022-08-10T21:07:37Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-08-09T13:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55568919616429fbc209880cf189a3adaceb6093'/>
<id>urn:sha1:55568919616429fbc209880cf189a3adaceb6093</id>
<content type='text'>
Cloning a remote repository is one of the most expensive operations in
Git. The server can spend a lot of CPU time generating a pack-file for
the client's request. The amount of data can clog the network for a long
time, and the Git protocol is not resumable. For users with poor network
connections or are located far away from the origin server, this can be
especially painful.

Add a new '--bundle-uri' option to 'git clone' to bootstrap a clone from
a bundle. If the user is aware of a bundle server, then they can tell
Git to bootstrap the new repository with these bundles before fetching
the remaining objects from the origin server.

Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
