[commit: ghc] master: Fix the autocrlf test in sync-all (d362d93)

Ian Lynagh igloo at earth.li
Sun Feb 17 18:05:37 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d362d93dd309fdbe2c613667ae8be5b4bef67e40

>---------------------------------------------------------------

commit d362d93dd309fdbe2c613667ae8be5b4bef67e40
Author: Ian Lynagh <igloo at earth.li>
Date:   Sun Feb 17 17:04:44 2013 +0000

    Fix the autocrlf test in sync-all
    
    Apparently git ignores the --git-dir argument.

>---------------------------------------------------------------

 sync-all |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sync-all b/sync-all
index a3c3277..abefb4c 100755
--- a/sync-all
+++ b/sync-all
@@ -169,13 +169,14 @@ sub configure_repository {
     if ($scm eq "git") {
         &scm($localpath, $scm, "config", "--local", "core.ignorecase", "true");
 
-        open my $git_autocrlf, '-|', 'git', '--git-dir', $localpath,
-                                            'config', '--get', 'core.autocrlf'
+        chdir($localpath);
+        open my $git_autocrlf, '-|', 'git', 'config', '--get', 'core.autocrlf'
             or die "Executing git config failed: $!";
         my $autocrlf = <$git_autocrlf>;
         $autocrlf = "" unless defined($autocrlf);
         chomp $autocrlf;
         close($git_autocrlf);
+        chdir($initial_working_directory);
         if ($autocrlf eq "true") {
             &scm($localpath, $scm,
                  "config", "--local", "core.autocrlf", "false");





More information about the ghc-commits mailing list