Ticket #7673 (closed bug: fixed)

Opened 3 months ago

Last modified 3 months ago

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

Reported by: morabbin Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.2
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

On my windows box, I experienced the following loop:

GROOB:~/work $ git clone git@github.com: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

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

Change History

Changed 3 months ago by rassilon

sync-all fixeol subcommand to deal with this issue

Changed 3 months 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?

Changed 3 months ago by ian@…

commit b46da7cc0d8a0a4a96d43ae1b1257b9adc31e347

Author: Ian Lynagh <ian@well-typed.com>
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(-)

Changed 3 months ago by igloo

  • status changed from patch to closed
  • difficulty set to Unknown
  • resolution set to fixed

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.

Note: See TracTickets for help on using tickets.