Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-146

Use .gitattributes to force linux line endings for all text files

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • None
    • None

      With .gitattributes we can force all java files etc to have linux file endings.

      I am experimenting with this in the optaplanner repository:
      https://github.com/droolsjbpm/optaplanner/commit/40dca629262568d5e5abb379655d0ea65aef19a6

      If it works well, we'll want to compile a good overall .gitattributes file and commit it to all droolsjbpm repositories.

      During the refactor to .gitattributes, execute this script to detect and fix all previous errors:
      https://help.github.com/articles/dealing-with-line-endings#re-normalizing-a-repository

      Important:
      In OptaPlanner we just committed the file without "fixing all previous errors". It turned out we had 2.
      The person who adds the .gitattributes file doesn't get a problem, but other people who clone a new repository
      get immediate modifications to incorrect files. This is a PITA.
      So after the commit .gitattributes files, all previous errors need to be fixed for and verified by doing a new clone and a git status on that new clone.

            mbiarnes@redhat.com Michael Biarnes Kiefer
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: