lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

fix: close file in the generateAtDir func

Open testwill opened this issue 1 year ago • 3 comments

  • PR Description close file in the generateAtDir func
  • Please check if the PR fulfills these requirements
  • [ ] Cheatsheets are up-to-date (run 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

testwill avatar Apr 07 '24 05:04 testwill

The change looks obviously right, but I'm curious what your reason was for making this change. Did you actually have a problem that is fixed by this? (Like, were you running out of file handles? Seems unlikely to me.) I find it helpful to mention this kind of information in the PR description and/or commit message.

stefanhaller avatar Apr 07 '24 07:04 stefanhaller

I also am simultaneously grateful for the PR and confused at the motivation. @testwill I see that you've got at least 600 repositories forked and most of them, from what I've seen, are forked for the purpose of raising a PR that fixes a typo or closes a file handle.

I'm curious: did you raise this PR yourself or was this automated?

jesseduffield avatar May 19 '24 10:05 jesseduffield

raise this PR myself. typo can use misspell, but not very precise. No tool can detect closing file handle,according to my understanding.

testwill avatar May 20 '24 02:05 testwill