Skip to content

Commit f3c9443

Browse files
authored
Fix go generate on windows (#3706)
Fix two problems with running `go generate ./...` on Windows: - the command would error out with `panic: Default config starting comment not found` (depending on the setup of the local git client) - after running the command, all files would show up as modified in git, but without a diff. Staging the files would make them disappear again, except for those that actually had changes. Fix both of these by configuring git to check out the generated text files with Unix line endings.
2 parents 6da4f9a + 71a62b7 commit f3c9443

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.go text
2+
*.md text eol=lf
3+
*.json text eol=lf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ lazygit.exe
1919

2020
# Exceptions
2121
!.gitignore
22+
!.gitattributes
2223
!.goreleaser.yml
2324
!.golangci.yml
2425
!.circleci/

docs/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Documentation Overview
2-
3-
* [Configuration](./Config.md).
4-
* [Custom Commands](./Custom_Command_Keybindings.md)
5-
* [Custom Pagers](./Custom_Pagers.md)
6-
* [Dev docs](./dev)
7-
* [Keybindings](./keybindings)
8-
* [Undo/Redo](./Undoing.md)
9-
* [Range Select](./Range_Select.md)
10-
* [Searching/Filtering](./Searching.md)
11-
* [Stacked Branches](./Stacked_Branches.md)
1+
# Documentation Overview
2+
3+
* [Configuration](./Config.md).
4+
* [Custom Commands](./Custom_Command_Keybindings.md)
5+
* [Custom Pagers](./Custom_Pagers.md)
6+
* [Dev docs](./dev)
7+
* [Keybindings](./keybindings)
8+
* [Undo/Redo](./Undoing.md)
9+
* [Range Select](./Range_Select.md)
10+
* [Searching/Filtering](./Searching.md)
11+
* [Stacked Branches](./Stacked_Branches.md)

vendor/github.com/kevinburke/ssh_config/.gitattributes

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)