github-backup 1.20140707 → 1.20140720
raw patch · 3 files changed
+16/−8 lines, 3 files
Files
- debian/changelog +8/−0
- github-backup.cabal +1/−1
- github-backup.hs +7/−7
debian/changelog view
@@ -1,3 +1,11 @@+github-backup (1.20140720) unstable; urgency=medium++ * Deal with trailing slashes on github repo urls. Closes: #755261+ * Fix bug introduced by change to embedded git libraries+ in last release. Closes: #755262++ -- Joey Hess <joeyh@debian.org> Sun, 20 Jul 2014 17:20:26 -0400+ github-backup (1.20140707) unstable; urgency=medium * Add --exclude to skip backing up a specific repository
github-backup.cabal view
@@ -1,5 +1,5 @@ Name: github-backup-Version: 1.20140707+Version: 1.20140720 Cabal-Version: >= 1.6 License: GPL Maintainer: Joey Hess <joey@kitenet.net>
github-backup.hs view
@@ -258,7 +258,7 @@ ingit f' = do h <- getCatFileHandle liftIO $ isJust <$> catObjectDetails h- (Git.Types.Ref $ show branchname ++ ":" ++ f')+ (Git.Types.Ref $ Git.Types.fromRef branchname ++ ":" ++ f') getCatFileHandle :: Backup CatFileHandle getCatFileHandle = go =<< getState catFileHandle@@ -312,7 +312,7 @@ | otherwise = Nothing where rest = drop (length prefix) u- bits = split "/" rest+ bits = dropWhile (not . null) $ split "/" rest dropdotgit s | ".git" `isSuffixOf` s = take (length s - length ".git") s | otherwise = s@@ -345,7 +345,7 @@ -- Reset index to current content of github -- branch. Does not touch work tree. Git.Command.run- [Param "reset", Param "-q", Param $ show branchref, File "." ] r+ [Param "reset", Param "-q", Param $ Git.Types.fromRef branchref, File "." ] r -- Stage workDir files into the index. h <- hashObjectStart r Git.UpdateIndex.streamUpdateIndex r@@ -369,8 +369,8 @@ where create True = do inRepo $ Git.Command.run- [Param "branch", Param $ show branchname, Param $ show originname]- fromMaybe (error $ "failed to create " ++ show branchname)+ [Param "branch", Param $ Git.Types.fromRef branchname, Param $ Git.Types.fromRef originname]+ fromMaybe (error $ "failed to create " ++ Git.Types.fromRef branchname) <$> branchsha create False = withIndex $ inRepo $ Git.Branch.commitAlways Git.Branch.AutomaticCommit "branch created" fullname []@@ -392,10 +392,10 @@ branchname = Git.Ref "github" fullname :: Git.Ref-fullname = Git.Ref $ "refs/heads/" ++ show branchname+fullname = Git.Ref $ "refs/heads/github" ++ Git.Types.fromRef branchname originname :: Git.Ref-originname = Git.Ref $ "refs/remotes/origin/" ++ show branchname+originname = Git.Ref $ "refs/remotes/origin/" ++ Git.Types.fromRef branchname hasOrigin :: Backup Bool hasOrigin = inRepo $ Git.Ref.exists originname