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

Attempt fix to #112 #113

Merged
merged 8 commits into from
Nov 23, 2024
Merged

Attempt fix to #112 #113

merged 8 commits into from
Nov 23, 2024

Conversation

ajoberstar
Copy link
Owner

This primarily covers an attempted fix for lighweight checkouts being used as references. Additionally, it tries to suppress more superfluous output from printing in the Gradle output.

Old tests didn't verify the signatures were produced and also assumed
that signing config wasn't set up wherever you ran tests. Since I do
use signed commits now for my own work, this was a bad assumption and
made the tests fail locally.

Now we check for either the signature to be present or that signing
failed because no secret key was found.

For disabling signing, we ensure that no signature was added to the commit.
When using git CLI, if you don't specify the initial branch for git
init, it gives a warning about you not having specified a preference
for what your initial branch should be.
Might regret this, but it's confusing to print out fatal errors here
when we handle the result either way. It's normal that some of these
value source's might fail, e.g. if your project isn't running from a
Git repo.
Old behavior was to use the reference repo (usually the project's
checkout repo) as a full remote that we would fetch from. However, Git
has a more direct way to reference an existing repo, using
`objects/info/alternates`. This mechanism will just let you reuse
objects that already exist in the reference repo rather than fetching
from the real remotes.

So now only origin is a remote and we just try to reuse objects from
the remote. This also simplifies things where we had to check if the
branch we cared about existed. Now, we don't care and if the objects
are relevant they get used and if not, it should be no harm, no foul.

This will hopefully address the issue that reported in #112.
@ajoberstar ajoberstar self-assigned this Nov 23, 2024
@ajoberstar ajoberstar merged commit 8b81ec4 into main Nov 23, 2024
1 check passed
@ajoberstar ajoberstar deleted the fixes branch November 23, 2024 21:39
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.

1 participant