From: "Andrew Arnott" <andrewarnott@gmail.com>
To: "Eyvind Bernhardsen" <eyvind-git@orakel.ntnu.no>
Cc: "Daniel Barkalow" <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: Repo corrupted somehow?
Date: Sat, 8 Nov 2008 07:19:13 -0800 [thread overview]
Message-ID: <216e54900811080719i43b4a631p241e9d2a54ed5ce9@mail.gmail.com> (raw)
In-Reply-To: <77005B51-0170-42EC-BBA7-DCF39C7CFC5E@orakel.ntnu.no>
I thought that autocrlf always 'added' CRLF instead of adding merely
CR. Dang. I'd rather have CRLF text files.
On Wed, Nov 5, 2008 at 4:26 AM, Eyvind Bernhardsen
<eyvind-git@orakel.ntnu.no> wrote:
> On 5. nov.. 2008, at 06.56, Daniel Barkalow wrote:
>
>> On Tue, 4 Nov 2008, Andrew Arnott wrote:
>>
>>> It was the CRLF conversion. When I played around with
>>> git config --global core.autocrlf true/false
>>> I got the problem to eventually go away.
>>>
>>> Thanks for all your responses.
>>
>> It's still worth debugging further, because git should know that it wrote
>> the files differently and not see that as changes. It's not too helpful to
>> have autocrlf if it causes this problem.
>
> I think I know what this is. If a repository contains files with CRLFs,
> those files will show as modified when core.autcorlf is true (if you commit
> them, the CRLFs will be converted to CRs in the repository, so in a sense
> they _are_ modified). Try turning autocrlf back on, cloning the repository,
> then touching all the files (to make git check them for changes) and see if
> you get the same problem.
>
> I proposed an alternative autocrlf implementation on the list a while back:
> making it an attribute instead of a configuration setting and adding a
> configuration setting to tell git which line ending is preferred when the
> autocrlf attribute is set.
>
> That would allow you to turn on autocrlf and let git convert all CRLFs to
> CRs in a single commit, thus converting a repository with CRLFs to one that
> can be used with autocrlf in a versioned way. In theory that lets you check
> out new commits with EOL conversion while old commits will be left alone
> (avoiding the problem you saw), but since .gitattributes is read from the
> working directory and not the tree to be checked out, it doesn't work
> perfectly.
>
> I implemented the easy bit (reading autocrlf from .gitattributes), but for
> various reasons the patch has just been gathering dust in my private git.git
> repo. Maybe I should dust it off :)
> --
> Eyvind
>
>
prev parent reply other threads:[~2008-11-08 15:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 7:09 Repo corrupted somehow? Andrew Arnott
2008-11-04 7:34 ` Andrew Arnott
2008-11-04 15:12 ` Andrew Arnott
2008-11-05 3:29 ` Jeff King
2008-11-05 4:21 ` Daniel Barkalow
[not found] ` <216e54900811042127id69b61fqbd9d001b8bc17a6a@mail.gmail.com>
2008-11-05 5:40 ` Andrew Arnott
2008-11-05 5:56 ` Daniel Barkalow
2008-11-05 12:26 ` Eyvind Bernhardsen
2008-11-08 15:19 ` Andrew Arnott [this message]
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=216e54900811080719i43b4a631p241e9d2a54ed5ce9@mail.gmail.com \
--to=andrewarnott@gmail.com \
--cc=barkalow@iabervon.org \
--cc=eyvind-git@orakel.ntnu.no \
--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