Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: prevent eol modification in vendored code
When 'dep ensure -vendor-only' is run, dep will update the dependencies in the vendor directory to match what's referenced in Gopkg.lock. It does this without performing EOL modification. Even if there are no changes to the dependencies, this shows up as pending changes in tree. ``` Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: vendor/github.com/Knetic/govaluate/LICENSE modified: vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE ``` When you run `git diff` to see the changes, warnings like the following are issued: ``` warning: CRLF will be replaced by LF in vendor/github.com/Knetic/govaluate/LICENSE. The file will have its original line endings in your working directory. ``` This is telling us that when we add the changes to the index, git will convert the CRLF to LF leaving is with no changes in the index and nothing to commit. We can prevent this confusion by disabling the automatic text conversion for files in the vendor folder. This change disables text conversion for vendor/** and re-adds the files with CRLF from our vendor tree. Signed-off-by: Matthew Sykes <[email protected]>
- Loading branch information