[jboss-jira] [JBoss JIRA] (DROOLS-146) Use .gitattributes to force linux line endings for all text files

Geoffrey De Smet (JIRA) issues at jboss.org
Wed Nov 26 09:13:40 EST 2014


     [ https://issues.jboss.org/browse/DROOLS-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey De Smet reassigned DROOLS-146:
---------------------------------------

    Assignee: Michael Biarnes Kiefer  (was: Geoffrey De Smet)


This has worked well for months on the optaplanner repository.

Michael,

1) All the other blessed repositories should now also get that .gitattributes file (copy it for the optaplanner repo). Possibly improve it first before copying.

2) Clean up all previous errors, as stated in the important above. Shells scripts like dos2unix etc can help here. All java files etc were dos2unixed 2 years ago, but we've seen many contributions since then ...

> Use .gitattributes to force linux line endings for all text files
> -----------------------------------------------------------------
>
>                 Key: DROOLS-146
>                 URL: https://issues.jboss.org/browse/DROOLS-146
>             Project: Drools
>          Issue Type: Task
>            Reporter: Geoffrey De Smet
>            Assignee: Michael Biarnes Kiefer
>
> 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.*



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jboss-jira mailing list