diff --git a/git.cabal b/git.cabal deleted file mode 100644 index 72e69359cbc4e35d1ccf773dec6097bc65116215..0000000000000000000000000000000000000000 --- a/git.cabal +++ /dev/null @@ -1,101 +0,0 @@ -Name: git -Version: 0.3.0 -Synopsis: Git operations in haskell -Description: - . - A Haskell implementation of git storage operations, allowing users - to manipulate git repositories (read and write). - . - This implementation is fully interoperable with the main C implementation. - . - This is strictly only manipulating the git store (what's inside the .git directory), - and doesn't do anything with the index or your working directory files. - . -License: BSD3 -License-file: LICENSE -Copyright: Vincent Hanquez <vincent@snarc.org> -Author: Vincent Hanquez <vincent@snarc.org> -Maintainer: Vincent Hanquez <vincent@snarc.org> -Category: Development -Stability: experimental -Build-Type: Simple -Homepage: https://github.com/vincenthz/hs-git -tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2 -Cabal-Version: >=1.8 -data-files: README.md -extra-source-files: tests/*.hs - -Library - Build-Depends: base >= 4.13 && < 5 - , basement - , bytestring >= 0.9 - , containers - , memory >= 0.13 - , cryptonite >= 0.22 - , vector - , random - , zlib - , zlib-bindings >= 0.1 && < 0.2 - , hourglass >= 0.2 - , unix-compat - , utf8-string - -- to remove - , system-filepath - , system-fileio - Exposed-modules: Data.Git - Data.Git.Monad - Data.Git.Types - Data.Git.Storage - Data.Git.Storage.PackIndex - Data.Git.Storage.Pack - Data.Git.Storage.Object - Data.Git.Storage.Loose - Data.Git.Named - Data.Git.Delta - Data.Git.Ref - Data.Git.Revision - Data.Git.Repository - Data.Git.Diff - Data.Git.Diff.Patience - Data.Git.Index - Other-modules: Data.Git.Internal - Data.Git.Imports - Data.Git.OS - Data.Git.Config - Data.Git.Storage.FileReader - Data.Git.Storage.FileWriter - Data.Git.Storage.CacheFile - Data.Git.Path - Data.Git.Parser - Data.Git.WorkTree - ghc-options: -Wall -fno-warn-unused-imports - -- -fno-warn-missing-signatures - - -Test-Suite test-unit - type: exitcode-stdio-1.0 - hs-source-dirs: tests - Main-Is: Tests.hs - Build-depends: base >= 3 && < 7 - , bytestring - , tasty - , tasty-quickcheck - , hourglass - , git - -Test-Suite test-repository - type: exitcode-stdio-1.0 - hs-source-dirs: tests - Main-Is: Repo.hs - other-modules: Monad - Build-depends: base >= 3 && < 7 - , bytestring - , tasty - , tasty-quickcheck - , hourglass - , bytedump >= 1.0 - , git - -source-repository head - type: git - location: https://github.com/vincenthz/hs-git diff --git a/hgit.cabal b/hgit.cabal new file mode 100644 index 0000000000000000000000000000000000000000..8925b900466fccdada93a5e810be5f60abf5bf92 --- /dev/null +++ b/hgit.cabal @@ -0,0 +1,138 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.2. +-- +-- see: https://github.com/sol/hpack + +name: hgit +version: 0.4.0 +synopsis: Git operations in Haskell +description: A Haskell implementation of git storage operations, allowing users + to manipulate git repositories (read and write). + . + This implementation is fully interoperable with the main C implementation. + . + This is strictly only manipulating the git store (what's inside the .git directory), + and doesn't do anything with the index or your working directory files. +category: Development +homepage: https://gitlab.chromabits.com/etcinit/hgit +author: Eduardo Trujillo +maintainer: ed@trujillo.io +copyright: Vincent Hanquez <vincent@snarc.org>, Eduardo Trujillo <ed@trujillo.io> +license: BSD3 +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + test/repo/Main.hs + test/repo/Monad.hs + test/unit/Main.hs + +library + exposed-modules: + Data.Git + Data.Git.Monad + Data.Git.Types + Data.Git.Storage + Data.Git.Storage.PackIndex + Data.Git.Storage.Pack + Data.Git.Storage.Object + Data.Git.Storage.Loose + Data.Git.Named + Data.Git.Delta + Data.Git.Ref + Data.Git.Revision + Data.Git.Repository + Data.Git.Diff + Data.Git.Diff.Patience + Data.Git.Index + other-modules: + Data.Git.Internal + Data.Git.Imports + Data.Git.OS + Data.Git.Config + Data.Git.Storage.FileReader + Data.Git.Storage.FileWriter + Data.Git.Storage.CacheFile + Data.Git.Path + Data.Git.Parser + Data.Git.WorkTree + ghc-options: -Wall + build-depends: + base >=4.13 && <5 + , basement + , bytestring >=0.9 + , containers + , cryptonite >=0.22 + , hourglass >=0.2 + , memory >=0.13 + , random + , system-fileio + , system-filepath + , unix-compat + , utf8-string + , vector + , zlib + , zlib-bindings >=0.1 && <0.2 + default-language: Haskell2010 + +test-suite repo + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Monad + hs-source-dirs: + test/repo + default-extensions: LambdaCase + ghc-options: -Wall + build-depends: + base >=4.13 && <5 + , basement + , bytedump >=1.0 + , bytestring >=0.9 + , containers + , cryptonite >=0.22 + , hgit + , hourglass + , memory >=0.13 + , random + , system-fileio + , system-filepath + , tasty + , tasty-quickcheck + , unix-compat + , utf8-string + , vector + , zlib + , zlib-bindings >=0.1 && <0.2 + default-language: Haskell2010 + +test-suite unit + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Paths_hgit + hs-source-dirs: + test/unit + default-extensions: LambdaCase + ghc-options: -Wall + build-depends: + base >=4.13 && <5 + , basement + , bytestring >=0.9 + , containers + , cryptonite >=0.22 + , hgit + , hourglass + , memory >=0.13 + , random + , system-fileio + , system-filepath + , tasty + , tasty-quickcheck + , unix-compat + , utf8-string + , vector + , zlib + , zlib-bindings >=0.1 && <0.2 + default-language: Haskell2010 diff --git a/hie.yaml b/hie.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4ef275e05d80f02a7a3fc08fb2c48e00a656102d --- /dev/null +++ b/hie.yaml @@ -0,0 +1,2 @@ +cradle: + stack: diff --git a/package.yaml b/package.yaml new file mode 100644 index 0000000000000000000000000000000000000000..30e476f0a889ecd520e52a22e8877461d39a1b7c --- /dev/null +++ b/package.yaml @@ -0,0 +1,96 @@ +name: hgit +version: 0.4.0 +synopsis: Git operations in Haskell +description: | + A Haskell implementation of git storage operations, allowing users + to manipulate git repositories (read and write). + + This implementation is fully interoperable with the main C implementation. + + This is strictly only manipulating the git store (what's inside the .git directory), + and doesn't do anything with the index or your working directory files. +homepage: https://gitlab.chromabits.com/etcinit/hgit +license: BSD3 +author: Eduardo Trujillo +maintainer: ed@trujillo.io +copyright: Vincent Hanquez <vincent@snarc.org>, Eduardo Trujillo <ed@trujillo.io> +category: Development +extra-source-files: + - README.md + - test/**/*.hs + +ghc-options: -Wall + +dependencies: + - base >= 4.13 && < 5 + - basement + - bytestring >= 0.9 + - containers + - memory >= 0.13 + - cryptonite >= 0.22 + - vector + - random + - zlib + - zlib-bindings >= 0.1 && < 0.2 + - hourglass >= 0.2 + - unix-compat + - utf8-string + - system-filepath + - system-fileio + +library: + # source-dirs: + # - src + exposed-modules: + - Data.Git + - Data.Git.Monad + - Data.Git.Types + - Data.Git.Storage + - Data.Git.Storage.PackIndex + - Data.Git.Storage.Pack + - Data.Git.Storage.Object + - Data.Git.Storage.Loose + - Data.Git.Named + - Data.Git.Delta + - Data.Git.Ref + - Data.Git.Revision + - Data.Git.Repository + - Data.Git.Diff + - Data.Git.Diff.Patience + - Data.Git.Index + other-modules: + - Data.Git.Internal + - Data.Git.Imports + - Data.Git.OS + - Data.Git.Config + - Data.Git.Storage.FileReader + - Data.Git.Storage.FileWriter + - Data.Git.Storage.CacheFile + - Data.Git.Path + - Data.Git.Parser + - Data.Git.WorkTree + +tests: + unit: + main: Main.hs + source-dirs: + - test/unit + default-extensions: LambdaCase + dependencies: + - hgit + - tasty + - tasty-quickcheck + - hourglass + repo: + main: Main.hs + source-dirs: + - test/repo + other-modules: + - Monad + default-extensions: LambdaCase + dependencies: + - hgit + - tasty + - tasty-quickcheck + - hourglass + - bytedump >= 1.0 diff --git a/tests/Repo.hs b/test/repo/Main.hs similarity index 99% rename from tests/Repo.hs rename to test/repo/Main.hs index f27fde5e8a09d3457e81813883b82b5d6af94bac..131b12bb5f71033f5f6fcc9b6b275cebfd020a89 100644 --- a/tests/Repo.hs +++ b/test/repo/Main.hs @@ -1,5 +1,7 @@ {-# LANGUAGE ScopedTypeVariables #-} +module Main where + import Control.Applicative import Control.Monad import qualified Data.ByteString as B diff --git a/tests/Monad.hs b/test/repo/Monad.hs similarity index 100% rename from tests/Monad.hs rename to test/repo/Monad.hs diff --git a/tests/Tests.hs b/test/unit/Main.hs similarity index 99% rename from tests/Tests.hs rename to test/unit/Main.hs index 661b194671067a2cf08c179b7d53d6427da08ffe..db5e57aac5692058889cb97d9dd2d07d1fba0e5c 100644 --- a/tests/Tests.hs +++ b/test/unit/Main.hs @@ -1,5 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} +module Main where + import Control.Applicative import Control.Monad import qualified Data.ByteString as B