git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthias Goerner <enischte@gmail.com>
To: git@vger.kernel.org
Subject: Should sparse checkout be extended to clone, fetch, commit, and merge?
Date: Mon, 17 Jun 2019 21:25:00 -0700	[thread overview]
Message-ID: <CALB88e9n7raRET8Av-uSih8Xj=iAaUYrVx_+cOR2Bf8zYGQaKw@mail.gmail.com> (raw)

Hi!

Sparse checkout is a great start but I wish that clone, fetch, commit,
and merge also had sparse functionality to skip operating on objects
associated with directories not listed in the sparse-checkout (or
similar) configuration file. To clarify, this is different from
shallow clone or fetch which skips old commits but still fetches the
objects associated to every file in the tree.

This functionality would be very useful when dealing with large
repositories. Sparse checkout helps, but it doesn't reduce at all the
amount of traffic and the amount of disk spaces needed for the .git
repository. git submodule is an alternative, but ideally, one wouldn't
need to break up a repository as it grows and use git submodule.

Are there any plans to implement this? And if not, why not? How much
effort would be to implement this?

I don't see a conceptual reason why this can't be done. In particular,
it is not hard to see that making a commit after a sparse clone/fetch
is still possible even though one does not know the content of each
file in the repository. For example, assume a repository has two
directories /A and /B at the root and a user fetched only the objects
in /B to make a change to a file in /B. git could compute the new hash
of the root to make a commit by computing the new hash for /B and
simply using the old hash for /A without the need to know the content
of /A.

Cheers,
    Matthias

                 reply	other threads:[~2019-06-18  4:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALB88e9n7raRET8Av-uSih8Xj=iAaUYrVx_+cOR2Bf8zYGQaKw@mail.gmail.com' \
    --to=enischte@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).