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

Actually determine if we are dealing with a shallow clone instead of … #298

Merged
merged 3 commits into from Dec 10, 2021

Conversation

tarkatronic
Copy link
Contributor

…assuming

To help us get this pull request reviewed and merged quickly, please be sure to include the following items:

  • Tests (if applicable)
  • Documentation (if applicable)
  • Changelog entry
  • A full explanation here in the PR description of the work done

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Backward Compatibility

Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?

  • Yes (backward compatible)
  • No (breaking changes)

Issue Linking

What's new?

Previously we checked to see if there were any local branches/refs to see if the clone was shallow. That worked great in PRs, because they have no local refs. Unfortunately when tartufo was used to scan against a branch that was a shallow clone, it failed again.

Now, we use a slightly more reliable method. When a shallow clone is created, a .git/shallow file is created. So now we check for that instead. This should work both in the case of a PR and in the case of a branch scan.

@sushantmimani sushantmimani merged commit 1fc63c2 into main Dec 10, 2021
@sushantmimani sushantmimani deleted the identify-shallow-clones branch December 10, 2021 00:48
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.

None yet

2 participants