[commit: ghc] master: use -e rather than -d when checking for the existence of a subrepo (146b0ea)

Ian Lynagh igloo at earth.li
Sun Jan 27 19:17:37 CET 2013


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/146b0eafa17f0ac28f7ef3f273919c4c6a22f45b

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

commit 146b0eafa17f0ac28f7ef3f273919c4c6a22f45b
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Sun Jan 13 12:02:10 2013 -0500

    use -e rather than -d when checking for the existence of a subrepo
    
    The .git file in a submodule's root directory is not necessarily a
    directory, as is the case for the 'time' submodule.
    
    This fixes #7577, where some './sync-all' operations don't detect
    that the 'time' submodule is present in the repository.

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

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

diff --git a/sync-all b/sync-all
index 0b29903..889f124 100755
--- a/sync-all
+++ b/sync-all
@@ -335,7 +335,7 @@ sub scmall {
         }
 
         my $darcs_repo_present = 1 if -d "$localpath/_darcs";
-        my $git_repo_present = 1 if -d "$localpath/.git" || ($bare_flag && -d "$localpath");
+        my $git_repo_present = 1 if -e "$localpath/.git" || ($bare_flag && -d "$localpath");
         if ($darcs_repo_present) {
             if ($git_repo_present) {
                 die "Found both _darcs and .git in $localpath";





More information about the ghc-commits mailing list