diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-02-23 16:57:01 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-02-23 16:57:01 -0400 |
commit | 7bd41a5ebf4e181199cb0819c52acb362ca9d552 (patch) | |
tree | bf75304c37d8ee7a4f213935fbd90aca8ac22f51 /doc/devblog/day_366__starting_adjusted_branches.mdwn | |
parent | 9c465ca7767523d02429e2221e89b538bb72cdac (diff) |
devblog
Diffstat (limited to 'doc/devblog/day_366__starting_adjusted_branches.mdwn')
-rw-r--r-- | doc/devblog/day_366__starting_adjusted_branches.mdwn | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/devblog/day_366__starting_adjusted_branches.mdwn b/doc/devblog/day_366__starting_adjusted_branches.mdwn new file mode 100644 index 000000000..3f50d76bf --- /dev/null +++ b/doc/devblog/day_366__starting_adjusted_branches.mdwn @@ -0,0 +1,33 @@ +Getting started on [[design/adjusted_branches]], taking a top-down and +bottom-up approach. Yesterday I worked on improving the design. Today, +built a `git mktree` interface that supports recursive tree generation and +filtering, which is the low-level core of what's needed to implement the +adjusted branches. + +To test that, wrote a fun program that generates a git tree with all +the filenames reversed. + +[[!format haskell """ +import Git.Tree +import Git.CurrentRepo +import Git.FilePath +import Git.Types +import System.FilePath + +main = do + r <- Git.CurrentRepo.get + (Tree t, cleanup) <- getTree (Ref "HEAD") r + print =<< recordTree r (Tree (map reverseTree t)) + cleanup + +reverseTree :: TreeContent -> TreeContent +reverseTree (TreeBlob f m s) = TreeBlob (reverseFile f) m s +reverseTree (RecordedSubTree f s l) = NewSubTree (reverseFile f) (map reverseTree l) + +reverseFile :: TopFilePath -> TopFilePath +reverseFile = asTopFilePath . joinPath . map reverse . splitPath . getTopFilePath +"""]] + +Also, fixed problems with the Android, Windows, and OSX builds today. +Made a point release of the OSX dmg, because the last several releases +of it will SIGILL on some hardware. |