Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-tag support #651

Merged
merged 15 commits into from Dec 15, 2022
Merged

auto-tag support #651

merged 15 commits into from Dec 15, 2022

Conversation

Byron
Copy link
Owner

@Byron Byron commented Dec 12, 2022

Tasks

  • read tagOpt from configuration and make it accessible on Remote
  • write non-default tagOpt keys when writing a Remote to git configuration
  • clone supports to configure fetch tag handling and writes the option if necessary
  • fetch respects fetch_tags option and figures out which tags (and their objects) are included in the pack to create them
  • gix remote refmap makes clear which specs are implicit, and we figure out if implicit specs should be forced (answer: no)
  • actually set include-tag
  • test new Update variant
  • gix clone learns --no-tags

Extras

  • provide a non-parallel way of directory traversal and use that for ref walks as they are less likely to be numerous. Then let jwalk use its own threadpool for each iteration to workaround deadlocking if there are not enough threads. Or fix the threading issue.

For another PR

Issues

…e. (#650)

Further make clear in the documentation that `bash` is used to execute
the fixture scripts, previously it wasn't even implied and got
lost in history.
This works by trying to execute the file directly, and on failure, use 'bash'
as interpreter.

That way we are finally able to support a wider variety of fixture generators
and make the crate more useful to a wieder audience.
@Byron Byron force-pushed the adjustments-for-cargo branch 4 times, most recently from eb8144a to ae35c60 Compare December 14, 2022 07:19
This flag always has to be added by the caller based on configuration.
@Byron Byron force-pushed the adjustments-for-cargo branch 4 times, most recently from 16bbcfd to 8be4f1b Compare December 14, 2022 17:38
…-tag`.

One can also check for its availability using `fetch::Arguments::can_use_include_tag()`.

Further there was a bugfix that assues V1 capabilities are correctly interpreted to support
include-tag.
@Byron Byron force-pushed the adjustments-for-cargo branch 2 times, most recently from 09b6f27 to 0cefb55 Compare December 15, 2022 14:16
That way it's clear if it should or shouldn't fetch included/reachable
tags automatically.

The default setting for this is to include tags, similar to `git`.

The `fetch_tags()` accessor allows to query this information, and the
`with_fetch_tags()` builder method allows to set the value comfortably
right after creating the `Remote` instance.

The `tagOpt` key will also be written as part of the remote's git
configuration.

Clone operations can set the `Tags` setting when configuring the
remote in a callback.

This also comes with a fix to assure that ref-updates aren't skipped
just because there was no pack to receive. That way, locally missing
refs or tags will automatically be put back.
Normally refspecs are coming from the configuration only, but now
implied specs due to the implicit include-tag feature also matter.
That way we can allow the implementation to choose whether they
need greatest speed at some cost or not.

This also allows us to create a new thread-pool on each iteration
as those who expect high cost or many files will likely chose to do
that instead of single-threaded iteration, which nicely contains the
threads needed and avoids keeping them alive as part of some global pool.
We only use parallel traversal where it matters most, namely
loose object traversal which can be many objects in up to 256 folders.
Being able to parallelize among them will be a noticable speedup
well worth the cost (presumably).

Ref traversals are single-threaded as we expect most refs in packed-refs
anyway.

Furthermore we can now consider parallel traversal safe as we don't
use the global rayon pool anymore, something that can break any parallel
iteration (and just a version of `jwalk` earlier it would deadlock).
This is the same as `git clone --no-tags`.
I don't know if the toolchain file works like that either,
set a local override for now via `rustup override set 1.65`.
@Byron Byron merged commit 083909b into main Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use bash in scripted_fixture_repo_read_only (or specify it as a dependency)
1 participant