Questions tagged [lf]

Line Feed is a special character (unicode U+000A).

Line Feed is a special character (unicode U+000A), (ASCII: '\n', 0x0A, 10 in decimal). Line feed (LF) and carriage return (CR) are closely associated to represent end of line (EOL).

68 questions
2
votes
1 answer

Git : Self-made file has line-ending problems

So, I have this new repo where I'm trying to start a collaborative project. I have already pushed .gitignore and .gitattributes (handling auto-crlf) files to it. My .gitattributes file is: # Set the default behavior, in case people don't have…
2
votes
2 answers

"Please make sure all files only have LF endings" error when pushing to a GitHub repo

I am new to Git. I forked a repo, created a branch, made some changes, committed and then when I push (git push origin master), I get the following error : Starting Pattern Checks .gitattributes --> Please make sure all files only have LF…
user2125722
  • 1,126
  • 3
  • 17
  • 29
2
votes
1 answer

Git repository with both CRLF and LF files?

I have a git repository whose files' line endings should be CRLF or LR on the checkedout depending on the specific file. For instance, I want that all *.sh files to be checked out with LR line endings while all *.bat files with CRLF. I've been…
Storo
  • 938
  • 1
  • 6
  • 28
2
votes
1 answer

Powershell and .txt format

Cisco SX20 systems allow you to access their Web interface and download a backup of their configuration in a .txt file. I can open the file and manually change settings, then re-upload the file with no problems. Now, I have a Powershell script that…
Blake
  • 29
  • 6
2
votes
1 answer

How can I migrate a git repo from Windows to Linux? (CRLF - LF issue)

I started a git repository on a Windows machine, and then I changed to a Linux machine. Everything is working fine, but every time I commit, I get the warning warning: CRLF will be replaced by LF in [file]. I know I can set auto conversion off but,…
vguzmanp
  • 754
  • 1
  • 10
  • 28
1
vote
2 answers

Remove line feed (LF) from XML node using XSLT

I have the following in an XML node: XXX YYY ZZZ (as you can see there is a line feed) My XSLT is really simple: How can I remove the line feed using XSLT?
user412045
1
vote
1 answer

diff and patch using wrong line ending when creating new files or line end changed

I'm trying to create a patch using diff, but I can't get the patch to use the line end characters used in the files when creating a new file or to change the line ending when the file changes it. Basically, I'm doing: cp -r dir1 dir3 diff -ruN dir1…
Jordan Evens
  • 405
  • 1
  • 4
  • 14
1
vote
1 answer

How to work if Linter throws error at every line?

Trying to work on a project, but I cannot commit because some Linter is under use. It throws errors like: Expected linebreaks to be 'LF' but found 'CRLF' I tried to follow the instructions at How do I force git to use LF instead of CR+LF under…
Lajos Arpad
  • 45,912
  • 26
  • 82
  • 148
1
vote
1 answer

Why does VSCode insert carriage return marked by ^M in gitt diff?

I'm running Ubuntu on WSL2 and VSCode on top of that. Although I have the "LF" setting on VSCode, whenever I save the file, VSCode insists on inserting a carriage return that gets marked as ^M with git diff. Check it out: diff --git…
1
vote
1 answer

Git pull on Windows (git smc client) doesn't respect .gitattributes's eol=lf

I am working on a project originally developed in Unix environment. Such project has a .gitattributes file with forcing eol=lf over standard crlf-lf conversion *.sh text eol=lf which is my understanding is telling git "keep the original LF line…
dragonmnl
  • 11,330
  • 25
  • 71
  • 115
1
vote
0 answers

Simple git clone mangles many files with phantom, un-resettable 'modified' state (LF-related?) - how to fix local, remote, or in new clone?

Some recent change in a Github repository I use often (Python gensim) has created a problem evident even in fresh clones (to a Ubuntu system with git-2.17.1): immediately after the clone, nearly all of the files already show as 'modified', and even…
gojomo
  • 40,306
  • 11
  • 74
  • 96
1
vote
1 answer

How to specify line endings (CRLF)

We're using Swagger Codegen 2.4.5 to generate models from our API. Everything is working exactly as we need with one relatively minor exception. We're generating C# models, and as per windows these are typically stored with CRLF line endings.…
Simon Laing
  • 1,134
  • 5
  • 16
1
vote
1 answer

Handling CRLF, CR and LF when reading a txt file

I have a portion of C-code as below which is complied in linux gcc environment. In my project I have to handle ALL CRLF, CR and LF when reading a txt file created from different OS. I'm not sure if fscanf() handles all cases automatically. Is there…
someDude
  • 21
  • 3
1
vote
2 answers

How to delete LF in XML-Files to receive one line xml file?

I have a file theme.xml that contains no "LF" see https://en.wikipedia.org/wiki/Newline. But after converting to js and return to xml my result contains "LF" line breaker. Is is a problem, because adobe acrobat 8 standard requires the xml file in…
1
vote
1 answer

Issue with CR LF inside columns that i am trying to read with VB in order to write them in a file

I have an issue while I am trying to read columns from a database and then write them with VB in a file. I want to have as end of each line the CR LF but some users in data entry added CR LF inside some columns (not know which of them). I want…
cgxanth
  • 65
  • 5