diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-06 19:00:01 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-06 19:00:01 -0400 |
commit | 6be8289158fd30d972ac22766452e7c9dc809e6f (patch) | |
tree | ba4929c7c8f27d2b43051f637394115cda39258b /Git | |
parent | 6ea1214fa5d19241851a977ab82437563e2afc81 (diff) | |
parent | 971ed2a464a1a1e4d5e650e32390d232cd354d9d (diff) |
Merge branch 'master' into relativepaths
Conflicts:
Locations.hs
debian/changelog
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Construct.hs | 4 | ||||
-rw-r--r-- | Git/Repair.hs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs index 108ee7eb7..0b926342f 100644 --- a/Git/Construct.hs +++ b/Git/Construct.hs @@ -46,8 +46,8 @@ fromCwd = getCurrentDirectory >>= seekUp r <- checkForRepo dir case r of Nothing -> case parentDir dir of - "" -> return Nothing - d -> seekUp d + Nothing -> return Nothing + Just d -> seekUp d Just loc -> Just <$> newFrom loc {- Local Repo constructor, accepts a relative or absolute path. -} diff --git a/Git/Repair.hs b/Git/Repair.hs index bee9f2b50..2930b9a0c 100644 --- a/Git/Repair.hs +++ b/Git/Repair.hs @@ -244,7 +244,7 @@ explodePackedRefsFile r = do where makeref (sha, ref) = do let dest = localGitDir r </> fromRef ref - createDirectoryIfMissing True (parentDir dest) + createDirectoryIfMissing True (takeDirectory dest) unlessM (doesFileExist dest) $ writeFile dest (fromRef sha) |