From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> The in-tree sparse-checkout feature allows architects to adapt their dependentent subsystems into sparse-checkout specificiations. This helps the typical users who do not know the full build system to use the sparse-chekcout in a pain-free way. In particular, if the sparse-checkout dependencies update at the same times as build dependencies, then the users automatically get new sparse-checkout definitions as they switch branches. For the Git codebase, it is not immediately obvious which directories are absolutely required for building Git. From my estimation, the necessary directories for building and testing Git on Linux are listed in the .sparse/base.deps file in this change. A few more directories in the compat/ dir are required for building on Windows. This presents a new possible workflow for Git contributors, especially those that want to test several new features in their workflow. The following allows a user to set up working on Git with partial clone and sparse-checkout: $ git clone --sparse --filter=blob:none https://github.com/git/git $ cd git $ git sparse-checkout set --in-tree .sparse/base.deps $ make test Perhaps there are ways we can further reduce the size of the "bare necessities" by rearranging code and adjusting the Makefile to match. In particular, I noticed that the vcs-svn directory is required for the build. It could be helpful to create a way to build a very small version of "core Git" that doesn't include integrations with other version control systems, and having them automatically disabled if they are missing from the sparse-checkout definition would be a great way to make that more accessible for contributors. Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx> --- .sparse/base.deps | 19 +++++++++++++++++++ .sparse/windows.deps | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 .sparse/base.deps create mode 100644 .sparse/windows.deps diff --git a/.sparse/base.deps b/.sparse/base.deps new file mode 100644 index 00000000000..b0682175dc3 --- /dev/null +++ b/.sparse/base.deps @@ -0,0 +1,19 @@ +[sparse] + dir = Documentation + dir = block-sha1 + dir = builtin + dir = compat/.depend + dir = contrib + dir = ewah + dir = gitweb + dir = mergetools + dir = negotiator + dir = perl + dir = refs + dir = sha1dc + dir = sha256 + dir = t + dir = templates + dir = trace2 + dir = vcs-svn + dir = xdiff diff --git a/.sparse/windows.deps b/.sparse/windows.deps new file mode 100644 index 00000000000..6c9bf1df335 --- /dev/null +++ b/.sparse/windows.deps @@ -0,0 +1,3 @@ +[sparse] + inherit = .sparse/base.deps + dir = compat -- gitgitgadget