Op 22-02-13 19:45, Geert Janssens schreef:
Op 22-02-13 19:23, Mike Evans schreef:
On Fri, 22 Feb 2013 18:47:48 +0100
Geert Janssens <janssens-ge...@telenet.be> wrote:

Op 22-02-13 14:43, Mike Evans schreef:
On Thu, 21 Feb 2013 18:55:31 +0100
Geert Janssens <janssens-ge...@telenet.be> wrote:

Op 21-02-13 18:19, Mike Evans schreef:
On Thu, 21 Feb 2013 18:04:37 +0100
Geert Janssens <janssens-ge...@telenet.be> wrote:

Op 21-02-13 16:54, Mike Evans schreef:
A git|svn|brain issue follows.

Having updated to the latest source using git-update script I
can't change branches because some of the files have the wrong
line endings, unless I commit the changes.
I get this message:
"Please, commit your changes or stash them before you can switch
branches."

Git stash doesn't work and I get similar output to that shown
below.

A git diff gives the following output.

warning: CRLF will be replaced by LF in
src/report/jqplot/excanvas.min.js. The file will have its
original line endings in your working directory. warning: CRLF
will be replaced by LF in
src/report/jqplot/jquery.jqplot.min.js. The file will have its
original line endings in your working directory.
SNIP
src/report/jqplot/plugins/jqplot.ciParser.min.js. The file will
have its original line endings in your working directory. diff
--git src/report/jqplot/excanvas.min.js
src/report/jqplot/excanvas.min.js index 83373a5..e699a26 100644
--- src/report/jqplot/excanvas.min.js +++
src/report/jqplot/excanvas.min.js @@ -1,3 +1,3 @@ -/* jqPlot
@VERSION | (c) 2009-2013 Chris Leonello | jplot.com
-   jsDate | (c) 2010-2013 Chris Leonello
+/* jqPlot @VERSION | (c) 2009-2013 Chris Leonello | jplot.com
+   jsDate | (c) 2010-2013 Chris Leonello


Um.  Not sure what to do or why this situation occurred in the
first place. I thought git took care of line ending
translations.
I can commmit locally then dcommit but is that going to screw it
up for anyone else?

Advice needed.  My love/hate relationship with GIT continues.


Mike Evans

Mike,

These happen because the git configuration didn't have a
definition for the line ending style for javascript files (.js).
While working on the charts I added this definition. Some files
that were already in git before now are checked out with
different line endings.

Can you try to run
git checkout src/report/jqplot/*.js
git checkout src/report/jqplot/plugins/*.js

Does that fix the issue ?

Geert
Hi Geert

Afraid not.  Can I modify my config file manually?  What do I
add|change if so?

Mike E
It looks like the solution needs slightly more work. Read the part
"Re-normalizing a repo" on this page:

https://help.github.com/articles/dealing-with-line-endings

Be sure to commit or stash your real changes before following this
procedure. If at the end there are still files complaining about
CRLF vs LF, you commit those. That would mean I have messed up in
my commit.

Geert
Hi Geert

After doing that and making things somewhat worse, that is, getting
even more files with line ending issues I git cloned a fresh copy
of gnucash from GitHub.

A git status gives me:

# On branch trunk
# 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:   src/report/jqplot/excanvas.min.js
#       modified:   src/report/jqplot/jquery.jqplot.min.js
#       modified:
src/report/jqplot/plugins/jqplot.BezierCurveRenderer.min.js #
modified: src/report/jqplot/plugins/jqplot.barRenderer.min.js
#       modified:
src/report/jqplot/plugins/jqplot.blockRenderer.min.js #
modified: src/report/jqplot/plugins/jqplot.bubbleRenderer.min.js
#       modified:
src/report/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
#       modified:
src/report/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
#       modified:
src/report/jqplot/plugins/jqplot.canvasOverlay.min.js #
modified:
src/report/jqplot/plugins/jqplot.canvasTextRenderer.min.js #
modified:
src/report/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
#       modified:
src/report/jqplot/plugins/jqplot.ciParser.min.js #

Same files with line ending issues, but at least no warnings.  It
can't be just me surely? Although sometimes it seems to be :)

Mike Evans

Just to test I did the same: cloned a fresh copy from GitHub and it
doesn't show any modified files. We seem to have a mystery here...

Let's try to find what is different between your and my setup.

The only difference I can imagine to cause this would be if you have
configured line ending preferences locally. Is there some config
parameter related to line endings in your $HOME/.gitconfig file (like
autocrlf) ? I don't have anything in there.

Geert
Thanks for checking Geert.  I removed my $HOME/.gitconfig and tried
again with the same result.  My git version is 1.7.6.5 on Fedora 15 not
sure it that makes any difference.  Anyway now we know where the
problem is (me) I know the solution is local.  Enough for today though
I think.
My git version is git-1.8.1.2-1.fc18.i686 on Fedora 18. I don't know if that makes a difference or not.

What exact url are you using to clone from github ?
Mine is g...@github.com:Gnucash/gnucash.git

Any other devs seeing this ?

Geert
Additionally, can you check if the "eol" attribute is already supported in your git version ? It is mentioned in "man gitattributes" on my system and is the attribute I'm using to force consistent line endings. It may be a more recent addition.

Geert
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to