-
Notifications
You must be signed in to change notification settings - Fork 486
Description
When I use createFile() the file that arrives in GitLab is missing any/all blank lines at the end of the file, blank lines throughout the file are not effected.
Thus the file I get when checked out in Linux reports noeol, in for example vim.
I tried adding \n to the String object as its passed to setContent() but it was stripped off as well.
If I write the same String to File on disk the blank lines are at the bottom as expected.
Here's the way I have the code...
someTextString = new String(Files.readAllBytes(Paths.get("thePathToSomeFile"))); RepositoryFileApi repositoryFileApi = new RepositoryFileApi(gitLabApi); RepositoryFile repositoryFile = new RepositoryFile(); repositoryFile.setFilePath("somePath"); repositoryFile.setContent(someTextString); repositoryFileApi.createFile(repositoryFile, 123456, "master", "Initial Commit");
I don't know if I'm doing something wrong, if this is expected, or what. I seems pretty straight forward.
Thanks