Opened 3 years ago

Closed 11 months ago

#7673 closed bug (wontfix)

Windows: run "git config --global core.autocrlf false" before cloning the repo

Reported by: morabbin Owned by: hvr
Priority: normal Milestone: 7.10.1
Component: Trac & Git Version:
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

On my windows box, I experienced the following loop:

GROOB:~/work $ git clone [email protected]:ghc/ghc.git
Cloning into 'ghc'...
remote: Counting objects: 223976, done.
remote: Compressing objects: 100% (44932/44932), done.
remote: Total 223976 (delta 179757), reused 222061 (delta 178061)
Receiving objects: 100% (223976/223976), 67.25 MiB | 560 KiB/s, done.
Resolving deltas: 100% (179757/179757), done.
GROOB:~/work $ cd ghc
GROOB:~/work/ghc $ ls
ANNOUNCE  SUBMAKEHELP    config.sub*   ghc.mk       mk/          tarballs
HACKING   aclocal.m4     configure.ac  ghc.spec.in  packages     utils/
LICENSE   bindisttest/   distrib/      includes/    rts/         validate*
MAKEHELP  boot*          docs/         install-sh*  rules/
Makefile  compiler/      driver/       libffi/      settings.in
README    config.guess*  ghc/          libraries/   sync-all*
GROOB:~/work/ghc $ ./sync-all get
 at ./sync-all line 287.
== Checking for old haddock repo
== Checking for old binary repo
== Checking for old mtl repo
== Checking for old Cabal repo
== Checking for old time from tarball
============================
ATTENTION!

You have an old time package in your GHC tree!

Please remove it (e.g. "rm -r libraries/time"), and then run
"./sync-all get" to get the new repository.
============================
GROOB:~/work/ghc $ l libraries/time
./  ../
GROOB:~/work/ghc $ rm -rf libraries/time
GROOB:~/work/ghc $ l libraries/time
/bin/ls: libraries/time: No such file or directory
GROOB:~/work/ghc $ ./sync-all get
 at ./sync-all line 287.
== Checking for old haddock repo
== Checking for old binary repo
== Checking for old mtl repo
== Checking for old Cabal repo
== Checking for old time from tarball
============================
ATTENTION!

You have an old time package in your GHC tree!

Please remove it (e.g. "rm -r libraries/time"), and then run
"./sync-all get" to get the new repository.
============================
GROOB:~/work/ghc $

Turns out the problem is solved by deleting the repo, running:

git config --global core.autocrlf false

and checking out the repo again.

Attachments (1)

7673.diff (1.3 KB) - added by rassilon 3 years ago.
sync-all fixeol subcommand to deal with this issue

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by rassilon

sync-all fixeol subcommand to deal with this issue

comment:1 Changed 3 years ago by rassilon

  • Status changed from new to patch

What do folks think about the 7673.diff attachment as a discussion point for dealing with this issue?

comment:2 Changed 3 years ago by ian@…

commit b46da7cc0d8a0a4a96d43ae1b1257b9adc31e347

Author: Ian Lynagh <[email protected]>
Date:   Sun Feb 17 16:57:30 2013 +0000

    Set repositories to have core.autocrlf == false; fixes #7673
    
    Based on a patch from rassilon.

 sync-all |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

comment:3 Changed 3 years ago by igloo

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from patch to closed

Thanks for the patch; I've done something similar, which automatically sets the setting and resets the repo when cloning if the repository has autocrlf set to true.

comment:4 Changed 15 months ago by thomie

  • Cc hvr added
  • Component changed from Compiler to Trac & Git
  • Owner set to hvr
  • Resolution fixed deleted
  • Status changed from closed to new
  • Version 7.6.2 deleted

Running ./sync-all get will now execute 'git reset --hard' if core.autocrlf=true, which could result in data loss when uncommitted changes are present.

comment:5 Changed 15 months ago by thomie

  • Cc hvr removed

comment:6 Changed 14 months ago by thoughtpolice

  • Milestone set to 7.10.1

Moving to 7.10.1.

comment:7 Changed 11 months ago by thomie

  • Resolution set to wontfix
  • Status changed from new to closed

Note: since all repositories have been turned into git submodules, you normally don't need sync-all anymore. See git working conventions and git submodules for the new submodule workflow.

Note: See TracTickets for help on using tickets.