Heads-up on git repo eol issue.

Rimvydas Jasinskas rimvydasjas at gmail.com
Wed Jul 5 02:52:04 PDT 2017


Hi,

During sanitary work on git repository we noticed a problem with one
of the commits to .gitattributes:

commit 74d54042dbade9a0b2e5830b9645fd12ebc978f4
Author: Eitan Adler <lists at eitanadler.com>
Date:   Sun Mar 5 10:27:43 2017 -0800

    Always use unix line endings

It was just reverted.
However if you happened to have local branches and having git warnings
on EOL conversions, just edit .gitattributes (simply comment out the
offending rule):
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-*      eol=lf
+#*     eol=lf
$ git status && git checkout .gitattributes && git status

Now you will be able to continue your work on your local branch.

An example to show the issues with such unwanted global rule:
$ rm .git/index && git reset && git status

or simply with quick tmpfs trick:
_# cd / && mount_tmpfs -C tmpfs /usr/src && cd /usr/src && git status
&& cd / && umount /usr/src
HEAD detached at origin/DragonFly_RELEASE_4_8
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:   contrib/expat/lib/expat.dsp
        modified:   contrib/expat/lib/expat_static.dsp
        modified:   contrib/expat/lib/expatw.dsp
        modified:   contrib/expat/lib/expatw_static.dsp
        modified:   contrib/ncurses/misc/form.def
        modified:   contrib/ncurses/misc/form.ref
        modified:   contrib/ncurses/misc/menu.def
        modified:   contrib/ncurses/misc/menu.ref
        modified:   contrib/ncurses/misc/ncurses.def
        modified:   contrib/ncurses/misc/ncurses.ref
        modified:   contrib/ncurses/misc/panel.def
        modified:   contrib/ncurses/misc/panel.ref
        modified:   contrib/ncurses/misc/tabset/vt100
        modified:   contrib/tcsh-6/tcsh.vcproj
        modified:   nrelease/gui/etc/pwd.db
        modified:   nrelease/gui/root/.fluxbox/backgrounds/dragonfly.png
        modified:   nrelease/gui/root/.fluxbox/icons/firefox.png
        modified:   nrelease/gui/root/.fluxbox/icons/pidgin.png
        modified:   nrelease/gui/root/.fluxbox/icons/reboot.png
        modified:   nrelease/gui/root/.fluxbox/icons/terminal.png
        modified:   nrelease/gui/root/.fluxbox/icons/xchat.png
        modified:   nrelease/gui/root/.fluxbox/icons/xpdf.png
        modified:   nrelease/gui/root/.idesktop/install.png
        modified:   nrelease/gui/root/.idesktop/readme.png
        modified:   nrelease/gui/root/.idesktop/terminal.png
        modified:   nrelease/root/autorun/dflylogo.png
        modified:   nrelease/root/autorun/links.png
        modified:   nrelease/root/autorun/started.png
        modified:   nrelease/root/autorun/welcome.png
        modified:   nrelease/root/dflybsd.ico
        modified:   sys/contrib/dev/run/LICENSE
        modified:   sys/dev/netif/bce/if_bcefw.h
        modified:   test/stress/stress2/doc/linuxforum06.pdf
        modified:   test/stress/stress2/doc/stress.pdf
        modified:   test/testcases/crypto/aes/ecbnk44.txt
        modified:   test/testcases/crypto/aes/ecbnk48.txt
        modified:   test/testcases/crypto/aes/ecbnt44.txt
        modified:   test/testcases/crypto/aes/ecbnt48.txt
        modified:   test/testcases/crypto/aes/ecbvk44.txt
        modified:   test/testcases/crypto/aes/ecbvk48.txt
        modified:   test/testcases/crypto/aes/ecbvt44.txt
        modified:   test/testcases/crypto/aes/ecbvt48.txt

As you can see none of these files must be eol=lf except for if_bcefw.h.

Rimvydas


More information about the Users mailing list