Boost logo

Boost :

Subject: Re: [boost] [git] Line endings in bootstrap.bat on Windows
From: Björn Pollex (bjoern.pollex_at_[hidden])
Date: 2013-11-25 09:22:12

On Mon, Nov 25, 2013 at 2:40 AM, Gavin Lambert <gavinl_at_[hidden]>wrote:

> On 25/11/2013 14:07, Quoth Dave Abrahams:
> Björn Pollex <bjoern.pollex_at_[hidden]> writes:
>> I just cloned the modularized Boost repository from Github [1]. Right
>>> after
>>> the clone is done, git status gives me a complete diff on bootstrap.bat
>>> (so
>>> probably line endings).
>>> I do have autocrlf = true in my system configuration, so this shouldn't
>>> be
>>> the problem, right?
>> It very well might be the problem.
> Provided that the backend repository uses LF line endings exclusively
> (which is the git-recommended style), autocrlf=true is the recommended
> setting on Windows and should not result in a diff being shown if the
> checkout was made with this setting in force. [1][2]
> You should only run into trouble if the repository is not LF-only or if
> your checkout contains mixed-EOL files, either from using editors that
> altered EOLs (which will be common on Windows if you don't have
> autocrlf=true) or from changing the autocrlf setting after checking out.
> If the conversion is not already normalising line endings to LFs, perhaps
> it should do so? (With some exceptions for test files specifically for
> specific EOL handling, if any.)
While setting autocrlf = false fixed the problem for bootstrap.bat, several
other files still show changes right after the clone. Here are the steps I

    git clone
    git submodule init
    git submodule update

Now when I run git status, I get this output:

    git status

    # On branch master
    # Changes not staged for commit:
    # (use "git add <file>..." to update what will be committed)
    # (use "git checkout -- <file>..." to discard changes in working
    # (commit or discard the untracked or modified content in submodules)
    # modified: libs/geometry (modified content)
    # modified: libs/interprocess (modified content)
    # modified: libs/intrusive (modified content)
    # modified: libs/multiprecision (modified content)
    # modified: libs/pool (modified content)
    no changes added to commit (use "git add" and/or "git commit -a")

The files affected are:


Except for geometry, all affected files are Visual Studio project files or
SVGs. What should be done about this? As far as I can see, these files
should not be modified by Git, because these types are explicitly set to
"text" in .gitattributes.

The same is also true for my previous problem with bootstrap.bat. It is
actually strange that changing my autocrlf setting fixed this problem,
because .gitattributes should overwrite that setting anyways.

Can someone explain this behavior and what I can do to get a clean clone?


    Björn Pollex

> [1]
> [2]
> _______________________________________________
> Unsubscribe & other changes:
> mailman/listinfo.cgi/boost

Boost list run by bdawes at, gregod at, cpdaniel at, john at