git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Strapetz <marc.strapetz@syntevo.com>
To: git@vger.kernel.org
Subject: Unexpected difference between core.autocrlf=true and .gitattributes text=auto
Date: Wed, 19 Mar 2014 14:44:42 +0100	[thread overview]
Message-ID: <53299F4A.6000600@syntevo.com> (raw)

I have a file.txt which is stored with CRLF in the repository (I'm on
Windows, but that should not matter). autocrlf has been set:

$ git config core.autocrlf
true

Git considers the working tree clean:

$ touch file.txt
$ git status
On branch master
nothing to commit, working directory clean

However, when adding .gitattributes with following content:

* text=auto

Git starts considering the file as modified:

$ touch file.txt
$ git status
On branch master
Changes not staged for commit:
...

        modified:   file.txt

I think it's correct to consider the file as modified, because when
committing it, it should be converted to CRLF.

But why doesn't it show up as modified in the first case?

-Marc

                 reply	other threads:[~2014-03-19 13:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53299F4A.6000600@syntevo.com \
    --to=marc.strapetz@syntevo.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).