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

fix could-not-access error #2260

Merged
merged 2 commits into from
Nov 11, 2022
Merged

fix could-not-access error #2260

merged 2 commits into from
Nov 11, 2022

Conversation

jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Nov 11, 2022

  • PR Description

fixes #1545

by passing the /dev/null arg to a git diff on a directory, we get a 'could not access' error. So we're not going to do that if we're dealing with a directory.

It would be cool however if we could show the untracked file as part of the diff, but I'm not sure how to do that. If we find a way, we should update the integration test that this PR introduces

This PR also fixes broken submodule tests in CI (See https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html)

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@aragon999
Copy link

Thank you for the fix :-)

Not sure if it helps, but using something like git status --untracked-files=all -s one could get a list of the files which are not tracked. Not sure how that fits into the current code though.

@jesseduffield
Copy link
Owner Author

@aragon999 it's not obvious how to use that to produce a single command that we can render the diff with. At any rate this PR solves the original problem.

@jesseduffield jesseduffield merged commit e6e9534 into master Nov 11, 2022
@jesseduffield jesseduffield deleted the could-not-access branch November 11, 2022 23:58
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.

Adding new file in new folder only shows message that null cannot be accessed
2 participants