- Mar 25, 2018
-
-
René Scharfe authored
Signed-off-by:
Rene Scharfe <l.s.r@web.de> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Dec 08, 2017
-
-
Jeff Hostetler authored
Add test to t5616 to bulk fetch missing objects following a partial fetch. A technique like this could be used in a pre-command hook for example. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach (partial) fetch to inherit the filter-spec used by the partial clone. Extend --no-filter to override this inheritance. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Additional end-to-end tests for partial clone. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
In fetch-pack, the global variable save_commit_buffer is set to 0, but not restored to its original value after use. In particular, if show_log() (in log-tree.c) is invoked after fetch_pack() in the same process, show_log() will return before printing out the commit message (because the invocation to get_cached_commit_buffer() returns NULL, because the commit buffer was not saved). I discovered this when attempting to run "git log -S" in a partial clone, triggering the case where revision walking lazily loads missing objects. Therefore, restore save_commit_buffer to its original value after use. An alternative to solve the problem I had is to replace get_cached_commit_buffer() with get_commit_buffer(). That invocation was introduced in commit a97934d8 ("use get_cached_commit_buffer where appropriate", 2014-06-13) to replace "commit->buffer" introduced in commit 3131b713 ("Add "--show-all" revision walker flag for debugging", 2008-02-13). In the latter commit, the commit author seems to be deciding between not showing an unparsed commit at all and showing an unparsed commit without the message (which is what the commit does), and did not mention parsing the unparsed commit, so I prefer to preserve the existing behavior. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
When running checkout, first prefetch all blobs that are to be updated but are missing. This means that only one pack is downloaded during such operations, instead of one per missing blob. This operates only on the blob level - if a repository has a missing tree, they are still fetched one at a time. This does not use the delayed checkout mechanism introduced in commit 2841e8f8 ("convert: add "status=delayed" to filter process protocol", 2017-06-30) due to significant conceptual differences - in particular, for partial clones, we already know what needs to be fetched based on the contents of the local repo alone, whereas for status=delayed, it is the filter process that tells us what needs to be checked in the end. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Create get and set routines for "partial clone" config settings. These will be used in a future commit by clone and fetch to remember the promisor remote and the default filter-spec. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach fetch to support filters. This is only allowed for the remote configured in extensions.partialcloneremote. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Separate out the calculation of remotes to be fetched from and the actual fetching. This will allow us to include an additional step before the actual fetching in a subsequent commit. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Created tests to verify fetch-pack and upload-pack support for excluding large blobs using --filter=blobs:limit=<n> parameter. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Fixup fetch-pack to accept --no-filter to be consistent with rev-list and pack-objects. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach upload-pack to negotiate object filtering over the protocol and to send filter parameters to pack-objects. This is intended for partial clone and fetch. The idea to make upload-pack configurable using uploadpack.allowFilter comes from Jonathan Tan's work in [1]. [1] https://public-inbox.org/git/f211093280b422c32cc1b7034130072f35c5ed51.1506714999.git.jonathantanmy@google.com/ Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach gc to stop traversal at promisor objects, and to leave promisor packfiles alone. This has the effect of only repacking non-promisor packfiles, and preserves the distinction between promisor packfiles and non-promisor packfiles. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach rev-list to support termination of an object traversal at any object from a promisor remote (whether one that the local repo also has, or one that the local repo knows about because it has another promisor object that references it). This will be used subsequently in gc and in the connectivity check used by fetch. For efficiency, if an object is referenced by a promisor object, and is in the local repo only as a non-promisor object, object traversal will not stop there. This is to avoid building the list of promisor object references. (In list-objects.c, the case where obj is NULL in process_blob() and process_tree() do not need to be changed because those happen only when there is a conflict between the expected type and the existing object. If the object doesn't exist, an object will be synthesized, which is fine.) Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach sha1_file to fetch objects from the remote configured in extensions.partialclone whenever an object is requested but missing. The fetching of objects can be suppressed through a global variable. This is used by fsck and index-pack. However, by default, such fetching is not suppressed. This is meant as a temporary measure to ensure that all Git commands work in such a situation. Future patches will update some commands to either tolerate missing objects (without fetching them) or be more efficient in fetching them. In order to determine the code changes in sha1_file.c necessary, I investigated the following: (1) functions in sha1_file.c that take in a hash, without the user regarding how the object is stored (loose or packed) (2) functions in packfile.c (because I need to check callers that know about the loose/packed distinction and operate on both differently, and ensure that they can handle the concept of objects that are neither loose nor packed) (1) is handled by the modification to sha1_object_info_extended(). For (2), I looked at for_each_packed_object and others. For for_each_packed_object, the callers either already work or are fixed in this patch: - reachable - only to find recent objects - builtin/fsck - already knows about missing objects - builtin/cat-file - warning message added in this commit Callers of the other functions do not need to be changed: - parse_pack_index - http - indirectly from http_get_info_packs - find_pack_entry_one - this searches a single pack that is provided as an argument; the caller already knows (through other means) that the sought object is in a specific pack - find_sha1_pack - fast-import - appears to be an optimization to not store a file if it is already in a pack - http-walker - to search through a struct alt_base - http-push - to search through remote packs - has_sha1_pack - builtin/fsck - already knows about promisor objects - builtin/count-objects - informational purposes only (check if loose object is also packed) - builtin/prune-packed - check if object to be pruned is packed (if not, don't prune it) - revision - used to exclude packed objects if requested by user - diff - just for optimization Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Dec 05, 2017
-
-
Jonathan Tan authored
Introduce fetch-object, providing the ability to fetch one object from a promisor remote. This uses fetch-pack. To do this, the transport mechanism has been updated with 2 flags, "from-promisor" to indicate that the resulting pack comes from a promisor remote (and thus should be annotated as such by index-pack), and "no-dependents" to indicate that only the objects themselves need to be fetched (but fetching additional objects is nevertheless safe). Whenever "no-dependents" is used, fetch-pack will refrain from using any object flags, because it is most likely invoked as part of a dynamic object fetch by another Git command (which may itself use object flags). An alternative to this is to leave fetch-pack alone, and instead update the allocation of flags so that fetch-pack's flags never overlap with any others, but this will end up shrinking the number of flags available to nearly every other Git command (that is, every Git command that accesses objects), so the approach in this commit was used instead. This will be tested in a subsequent commit. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
In a subsequent commit, index-pack will be taught to write ".promisor" files which are similar to the ".keep" files it knows how to write. Refactor the writing of ".keep" files, so that the implementation of writing ".promisor" files becomes easier. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach fsck to not treat missing promisor objects provided on the CLI as an error when extensions.partialclone is set. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach fsck to not treat missing promisor objects indirectly pointed to by refs as an error when extensions.partialclone is set. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Teach fsck to not treat refs referring to missing promisor objects as an error when extensions.partialclone is set. For the purposes of warning about no default refs, such refs are still treated as legitimate refs. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Currently, Git does not support repos with very large numbers of objects or repos that wish to minimize manipulation of certain blobs (for example, because they are very large) very well, even if the user operates mostly on part of the repo, because Git is designed on the assumption that every referenced object is available somewhere in the repo storage. In such an arrangement, the full set of objects is usually available in remote storage, ready to be lazily downloaded. Teach fsck about the new state of affairs. In this commit, teach fsck that missing promisor objects referenced from the reflog are not an error case; in future commits, fsck will be taught about other cases. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jonathan Tan authored
Introduce new repository extension option: `extensions.partialclone` See the update to Documentation/technical/repository-version.txt in this patch for more information. Signed-off-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach rev-list to support --no-filter to override a previous --filter=<filter_spec> argument. This is to be consistent with commands that use OPT_PARSE macros. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach opt_parse_list_objects_filter() to take --no-filter option and to free the contents of struct filter_options. This command line argument will be automatically inherited by commands using OPT_PARSE_LIST_OBJECTS_FILTER(); this includes pack-objects. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Christian Couder authored
Signed-off-by:
Christian Couder <chriscool@tuxfamily.org> Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Nov 22, 2017
-
-
Jeff Hostetler authored
Teach pack-objects to use the filtering provided by the traverse_commit_list_filtered() interface to omit unwanted objects from the resulting packfile. Filtering requires the use of the "--stdout" option. Add t5317 test. In the future, we will introduce a "partial clone" mechanism wherein an object in a repo, obtained from a remote, may reference a missing object that can be dynamically fetched from that remote once needed. This "partial clone" mechanism will have a way, sometimes slow, of determining if a missing link is one of the links expected to be produced by this mechanism. This patch introduces handling of missing objects to help debugging and development of the "partial clone" mechanism, and once the mechanism is implemented, for a power user to perform operations that are missing-object aware without incurring the cost of checking if a missing link is expected. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Teach rev-list to use the filtering provided by the traverse_commit_list_filtered() interface to omit unwanted objects from the result. Object filtering is only allowed when one of the "--objects*" options are used. When the "--filter-print-omitted" option is used, the omitted objects are printed at the end. These are marked with a "~". This option can be combined with "--quiet" to get a list of just the omitted objects. Add t6112 test. In the future, we will introduce a "partial clone" mechanism wherein an object in a repo, obtained from a remote, may reference a missing object that can be dynamically fetched from that remote once needed. This "partial clone" mechanism will have a way, sometimes slow, of determining if a missing link is one of the links expected to be produced by this mechanism. This patch introduces handling of missing objects to help debugging and development of the "partial clone" mechanism, and once the mechanism is implemented, for a power user to perform operations that are missing-object aware without incurring the cost of checking if a missing link is expected. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Create traverse_commit_list_filtered() and add filtering interface to allow certain objects to be omitted from the traversal. Update traverse_commit_list() to be a wrapper for the above with a null filter to minimize the number of callers that needed to be changed. Object filtering will be used in a future commit by rev-list and pack-objects for partial clone and fetch to omit unwanted objects from the result. traverse_bitmap_commit_list() does not work with filtering. If a packfile bitmap is present, it will not be used. It should be possible to extend such support in the future (at least to simple filters that do not require object pathnames), but that is beyond the scope of this patch series. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Add the usual iterator methods to oidset. Add oidset_remove(). Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Add the usual map iterator functions to oidmap. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff Hostetler authored
Refactor add_excludes() to separate the reading of the exclude file into a buffer and the parsing of the buffer into exclude_list items. Add add_excludes_from_blob_to_list() to allow an exclude file be specified with an OID without assuming a local worktree or index exists. Refactor read_skip_worktree_file_from_index() and add do_read_blob() to eliminate duplication of preliminary processing of blob contents. Signed-off-by:
Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by:
Jonathan Tan <jonathantanmy@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Oct 30, 2017
-
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
git://github.com/git-l10n/git-poJunio C Hamano authored
l10n for Git 2.15.0 round 2 with Catalan updates * tag 'l10n-2.15.0-rnd2.1' of git://github.com/git-l10n/git-po: l10n: Update Catalan translation
-
- Oct 29, 2017
-
-
Jordi Mas authored
Signed-off-by:
Jordi Mas <jmas@softcatala.org>
-
- Oct 28, 2017
-
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
Doc flow fix. * sg/rev-list-doc-reorder-fix: rev-list-options.txt: use correct directional reference
-
Junio C Hamano authored
Doc markup fix. * sb/rev-parse-show-superproject-root: docs: fix formatting of rev-parse's --show-superproject-working-tree
-
Junio C Hamano authored
A possible oom error is now caught as a fatal error, instead of continuing and dereferencing NULL. * ao/path-use-xmalloc: path.c: use xmalloc() in add_to_trie()
-