Skip to content

Unable to detect git repo in 1.37 #1941

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

Closed
3 of 4 tasks
naveensrinivasan opened this issue Apr 28, 2021 · 4 comments
Closed
3 of 4 tasks

Unable to detect git repo in 1.37 #1941

naveensrinivasan opened this issue Apr 28, 2021 · 4 comments
Labels
question Further information is requested

Comments

@naveensrinivasan
Copy link

naveensrinivasan commented Apr 28, 2021

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).
  • Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
Description of the problem

Upgrading from 1.36 to 1.37 is causing new issues checks fails.

level=warning msg="[runner] Can't process result by diff processor: can't prepare diff by revgrep: could not read git repo: error executing git diff HEAD~: exit status 128"

Version of golangci-lint
$ golangci-lint --version
# paste output here
1.37
Config file
$ cat .golangci.yml
# paste output here
Go environment
$ go version && go env
# paste output here
 1.16
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here
Code example or link to a public repository

ossf/scorecard#369

https://github.com/ossf/scorecard/runs/2461368761?check_suite_focus=true

@naveensrinivasan naveensrinivasan added the bug Something isn't working label Apr 28, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Apr 28, 2021

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez
Copy link
Member

ldez commented Apr 29, 2021

Hello,

From your logs:

Run actions/checkout@v2
  with:
    repository: ossf/scorecard
    token: ***
    ssh-strict: true
    persist-credentials: true
    clean: true
    fetch-depth: 1
    lfs: false
    submodules: false

https://github.com/ossf/scorecard/runs/2461368761?check_suite_focus=true

I think that fetch-depth: 1 not enough to create the right diff.

I think you have to do what I have explain here #1088 (comment)

    steps:

      - name: Check out code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

@ldez
Copy link
Member

ldez commented Apr 29, 2021

In v1.37.0 (#1723) we fixed #970: the problem was a silent failure on large git histories.
Maybe before the update, golangci-lint skipped the analysis on your repo.

@ldez ldez added the feedback required Requires additional feedback label Apr 29, 2021
@naveensrinivasan
Copy link
Author

In v1.37.0 (#1723) we fixed #970: the problem was a silent failure on large git histories.
Maybe before the update, golangci-lint skipped the analysis on your repo.

Thank you! That solves the issue 👍

@ldez ldez added question Further information is requested and removed bug Something isn't working feedback required Requires additional feedback labels Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants