@dhoko opened this Issue on January 11th 2016

screenshot from 2016-01-11 11 28 27

Hi,
After a git clone I've got some some Changes not staged for commit :/

$ myOS 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty
$ git config --list
user.name=dhoko
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git<a class='mention' href='https://github.com/github'>@github</a>.com:piwik/piwik.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
@tsteur commented on January 11th 2016 Member

what does it show when you do a git diff?

@dhoko commented on January 12th 2016

git diff

errors:

$ git diff > ../diffpiwik.log
warning: CRLF will be replaced by LF in libs/bower_components/jquery.scrollTo/README.md.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/bower_components/jquery.scrollTo/jquery.scrollTo.min.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/bower_components/jquery.scrollTo/scrollTo.jquery.json.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/pChart/GPLv3.txt.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/pChart/class/pData.class.php.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/pChart/class/pDraw.class.php.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/pChart/class/pImage.class.php.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in libs/pChart/class/pPie.class.php.
The file will have its original line endings in your working directory.
@tsteur commented on January 12th 2016 Member

Looks like the files have windows line endings which we could change to Linux endings. I couldn't reproduce it though:

git config --list
user.email=yyy
user.name=yyy
filter.lfs.clean=git-lfs clean %f
filter.lfs.smudge=git-lfs smudge %f
filter.lfs.required=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git<a class='mention' href='https://github.com/github'>@github</a>.com:piwik/piwik.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

These changes could be ignored with core.autocrlf but that's not a solution. Can someone else reproduce it?

@evifere commented on January 13th 2016

me too on Debian GNU/Linux 8.2 jessie
screenshot_084

@mattab commented on February 2nd 2016 Member

maybe try git config --global core.autocrlf input source: https://help.github.com/articles/dealing-with-line-endings/

@dhoko commented on February 10th 2016

It works \o/ Merci !

@dhoko commented on February 24th 2016

It works with this repository but does not with mine :/
Should I create a new fork ?

Cannot stash changes :/

The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in plugins/DevicesDetection/images/brand/iBerry.ico.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in plugins/DevicesDetection/images/brand/teXet.ico.
The file will have its original line endings in your working directory.
@mattab commented on March 15th 2016 Member

@dhoko I'm not sure what the problem is. feel free to create new fork if it helps :+1:

@mattab commented on May 23rd 2016 Member

Here is a solution:

# important:    Save  / commit your current files in Git, so that none of your work is lost.

#    Remove every file from Git's index.
    git rm --cached -r .

#    Rewrite the Git index to pick up all the new line endings.
    git reset --hard

EDIT: and another one simpler?

git checkout --force master
@jurgenhaas commented on August 5th 2016

This is still a problem when you clone 2.16.2, these files have the wrong line endings:

libs/bower_components/jquery.scrollTo/README.md
libs/bower_components/jquery.scrollTo/jquery.scrollTo.min.js
libs/bower_components/jquery.scrollTo/scrollTo.jquery.json
libs/pChart/GPLv3.txt
libs/pChart/class/pDraw.class.php
tests/UI/expected-ui-screenshots 
@Findus23 commented on August 25th 2018 Member

All CRLF fileendings should have been replaced since in https://github.com/matomo-org/matomo/issues/11869, so the error shouldn't occur anymore.

@ravindrapankaj commented on December 4th 2018

I think you need to run:
git add '.' (period/dot without quotes) or name of your modified file
and then
git commit -m "Your Message"

This Issue was closed on August 25th 2018
Powered by GitHub Issue Mirror