Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Line Endings

    Scheduled Pinned Locked Moved Development
    4 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      NOYB
      last edited by

      Using GitExtension (http://code.google.com/p/gitextensions/) and having trouble with pfSense line endings.

      With core.autocrlf set to true it wants to change LF to CRLF
      With core.autocrlf set to input it wants to change CRLF to LF
      With core.autocrlf set to false it wants to change CRLF to LF

      I was of the understanding that true was the desired setting for cross platform and was to commit with Unix-style line endings (LF).

      What should the line endings setting be for working with pfSense?

      Thanks

      Line Endings Settings and Commit Warnings:
      Checkout Windows-style, commit Unix-style line endings ("core.autocrlf" is set to "true")
      warning: LF will be replaced by CRLF in etc/inc/upgrade_config.inc.
      The file will have its original line endings in your working directory.

      Checkout as-is, commit Unix-style line endings ("core.autocrlf" is set to "input")
      warning: CRLF will be replaced by LF in conf.default/config.xml.
      The file will have its original line endings in your working directory.

      Checkout as-is, commit as-is ("core.autocrlf" is set to "false")
      warning: CRLF will be replaced by LF in conf.default/config.xml.
      The file will have its original line endings in your working directory.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Leave it on auto.

        The line endings git puts on your machine are whatever your OS wants.

        The line endings git will commit on the other hand, are always going to be LF only.

        We have a .gitattributes file that also tells the git client how they should be handled directly so in most cases you shouldn't have to touch the settings, just leave it on auto.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • N
          NOYB
          last edited by

          Okay.ย  So just ignore the warning when doing a commit that LF is going to be replaced with CRLF?

          warning: LF will be replaced by CRLF in etc/inc/upgrade_config.inc.
          The file will have its original line endings in your working directory.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Yep, that's normal.

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.