repository: merge git.Hash in for one less /util package

Michael Muré created

Change summary

api/graphql/gqlgen.yml           |  10 
api/graphql/graph/gen_graph.go   | 253 ++++++++++++++++-----------------
api/graphql/models/gen_models.go |   6 
api/http/git_file_handler.go     |   4 
bug/bug.go                       |   7 
bug/comment.go                   |   7 
bug/op_add_comment.go            |  14 
bug/op_create.go                 |  20 +-
bug/op_edit_comment.go           |  22 +-
bug/operation.go                 |   6 
bug/operation_pack.go            |   8 
bug/operation_pack_test.go       |   7 
bug/operation_test.go            |   5 
bug/timeline.go                  |   4 
cache/bug_cache.go               |   6 
cache/repo_cache.go              |   9 
identity/identity.go             |   5 
identity/version.go              |   8 
repository/git.go                |  37 ++--
repository/hash.go               |   2 
repository/mock_repo.go          |  55 +++---
repository/repo.go               |  21 +-
repository/repo_testing.go       |   4 
repository/tree_entry.go         |   6 
repository/tree_entry_test.go    |   6 
25 files changed, 260 insertions(+), 272 deletions(-)

Detailed changes

api/graphql/gqlgen.yml 🔗

@@ -6,11 +6,11 @@ model:
 
 models:
   Repository:
-    model: github.com/MichaelMure/git-bug/graphql/models.Repository
+    model: github.com/MichaelMure/git-bug/api/graphql/models.Repository
   RepositoryMutation:
-    model: github.com/MichaelMure/git-bug/graphql/models.RepositoryMutation
+    model: github.com/MichaelMure/git-bug/api/graphql/models.RepositoryMutation
   Bug:
-    model: github.com/MichaelMure/git-bug/graphql/models.BugWrapper
+    model: github.com/MichaelMure/git-bug/api/graphql/models.BugWrapper
     fields:
       actors:
         resolver: true
@@ -27,11 +27,11 @@ models:
   Comment:
     model: github.com/MichaelMure/git-bug/bug.Comment
   Identity:
-    model: github.com/MichaelMure/git-bug/graphql/models.IdentityWrapper
+    model: github.com/MichaelMure/git-bug/api/graphql/models.IdentityWrapper
   Label:
     model: github.com/MichaelMure/git-bug/bug.Label
   Hash:
-    model: github.com/MichaelMure/git-bug/util/git.Hash
+    model: github.com/MichaelMure/git-bug/repository.Hash
   Operation:
     model: github.com/MichaelMure/git-bug/bug.Operation
   CreateOperation:

api/graphql/graph/gen_graph.go 🔗

@@ -15,12 +15,11 @@ import (
 
 	"github.com/99designs/gqlgen/graphql"
 	"github.com/99designs/gqlgen/graphql/introspection"
-	"github.com/vektah/gqlparser"
-	"github.com/vektah/gqlparser/ast"
-
 	"github.com/MichaelMure/git-bug/api/graphql/models"
 	"github.com/MichaelMure/git-bug/bug"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
+	"github.com/vektah/gqlparser"
+	"github.com/vektah/gqlparser/ast"
 )
 
 // region    ************************** generated!.gotpl **************************
@@ -2621,7 +2620,7 @@ func (ec *executionContext) field_Mutation_addComment_args(ctx context.Context,
 	args := map[string]interface{}{}
 	var arg0 models.AddCommentInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentInput(ctx, tmp)
+		arg0, err = ec.unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2635,7 +2634,7 @@ func (ec *executionContext) field_Mutation_changeLabels_args(ctx context.Context
 	args := map[string]interface{}{}
 	var arg0 *models.ChangeLabelInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx, tmp)
+		arg0, err = ec.unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2649,7 +2648,7 @@ func (ec *executionContext) field_Mutation_closeBug_args(ctx context.Context, ra
 	args := map[string]interface{}{}
 	var arg0 models.CloseBugInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugInput(ctx, tmp)
+		arg0, err = ec.unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2663,7 +2662,7 @@ func (ec *executionContext) field_Mutation_newBug_args(ctx context.Context, rawA
 	args := map[string]interface{}{}
 	var arg0 models.NewBugInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalNNewBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐNewBugInput(ctx, tmp)
+		arg0, err = ec.unmarshalNNewBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2677,7 +2676,7 @@ func (ec *executionContext) field_Mutation_openBug_args(ctx context.Context, raw
 	args := map[string]interface{}{}
 	var arg0 models.OpenBugInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalNOpenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOpenBugInput(ctx, tmp)
+		arg0, err = ec.unmarshalNOpenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2691,7 +2690,7 @@ func (ec *executionContext) field_Mutation_setTitle_args(ctx context.Context, ra
 	args := map[string]interface{}{}
 	var arg0 models.SetTitleInput
 	if tmp, ok := rawArgs["input"]; ok {
-		arg0, err = ec.unmarshalNSetTitleInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐSetTitleInput(ctx, tmp)
+		arg0, err = ec.unmarshalNSetTitleInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitleInput(ctx, tmp)
 		if err != nil {
 			return nil, err
 		}
@@ -2979,7 +2978,7 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
@@ -3079,9 +3078,9 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
@@ -3146,7 +3145,7 @@ func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field gr
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
@@ -3248,7 +3247,7 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context,
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
@@ -3348,9 +3347,9 @@ func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, f
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
@@ -3588,7 +3587,7 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
 	}
 	res := resTmp.(models.Status)
 	fc.Result = res
-	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
+	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3690,7 +3689,7 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3799,7 +3798,7 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle
 	}
 	res := resTmp.(*models.IdentityConnection)
 	fc.Result = res
-	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
+	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3840,7 +3839,7 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql
 	}
 	res := resTmp.(*models.IdentityConnection)
 	fc.Result = res
-	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
+	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3881,7 +3880,7 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col
 	}
 	res := resTmp.(*models.CommentConnection)
 	fc.Result = res
-	return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res)
+	return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3922,7 +3921,7 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col
 	}
 	res := resTmp.(*models.TimelineItemConnection)
 	fc.Result = res
-	return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res)
+	return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
@@ -3963,7 +3962,7 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C
 	}
 	res := resTmp.(*models.OperationConnection)
 	fc.Result = res
-	return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
+	return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
@@ -3997,7 +3996,7 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap
 	}
 	res := resTmp.([]*models.BugEdge)
 	fc.Result = res
-	return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
@@ -4031,7 +4030,7 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap
 	}
 	res := resTmp.([]models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res)
+	return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
@@ -4065,7 +4064,7 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
@@ -4167,7 +4166,7 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
@@ -4232,7 +4231,7 @@ func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field g
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
@@ -4365,7 +4364,7 @@ func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field grap
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
@@ -4535,7 +4534,7 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
@@ -4601,9 +4600,9 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
@@ -4637,7 +4636,7 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field
 	}
 	res := resTmp.([]*models.CommentEdge)
 	fc.Result = res
-	return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
@@ -4705,7 +4704,7 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
@@ -4943,7 +4942,7 @@ func (ec *executionContext) _CreateOperation_author(ctx context.Context, field g
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
@@ -5077,9 +5076,9 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CreateTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
@@ -5147,7 +5146,7 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
@@ -5247,9 +5246,9 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
@@ -5453,7 +5452,7 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
@@ -5587,9 +5586,9 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie
 		}
 		return graphql.Null
 	}
-	res := resTmp.([]git.Hash)
+	res := resTmp.([]repository.Hash)
 	fc.Result = res
-	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, field.Selections, res)
+	return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
@@ -5883,7 +5882,7 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field
 	}
 	res := resTmp.([]*models.IdentityEdge)
 	fc.Result = res
-	return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
@@ -5917,7 +5916,7 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field
 	}
 	res := resTmp.([]models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx, field.Selections, res)
+	return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
@@ -5951,7 +5950,7 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
@@ -6053,7 +6052,7 @@ func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphq
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
@@ -6189,7 +6188,7 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
@@ -6359,7 +6358,7 @@ func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field
 	}
 	res := resTmp.(models.LabelChangeStatus)
 	fc.Result = res
-	return ec.marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx, field.Selections, res)
+	return ec.marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _LabelChangeTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
@@ -6427,7 +6426,7 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context,
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
@@ -6563,7 +6562,7 @@ func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field gr
 	}
 	res := resTmp.([]*models.LabelEdge)
 	fc.Result = res
-	return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
@@ -6631,7 +6630,7 @@ func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
@@ -6774,7 +6773,7 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.
 	}
 	res := resTmp.(*models.NewBugPayload)
 	fc.Result = res
-	return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res)
+	return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -6815,7 +6814,7 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap
 	}
 	res := resTmp.(*models.AddCommentPayload)
 	fc.Result = res
-	return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res)
+	return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -6856,7 +6855,7 @@ func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field gr
 	}
 	res := resTmp.(*models.ChangeLabelPayload)
 	fc.Result = res
-	return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res)
+	return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -6897,7 +6896,7 @@ func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql
 	}
 	res := resTmp.(*models.OpenBugPayload)
 	fc.Result = res
-	return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res)
+	return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -6938,7 +6937,7 @@ func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphq
 	}
 	res := resTmp.(*models.CloseBugPayload)
 	fc.Result = res
-	return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res)
+	return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -6979,7 +6978,7 @@ func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphq
 	}
 	res := resTmp.(*models.SetTitlePayload)
 	fc.Result = res
-	return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res)
+	return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
@@ -7044,7 +7043,7 @@ func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphq
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
@@ -7143,7 +7142,7 @@ func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graph
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
@@ -7211,7 +7210,7 @@ func (ec *executionContext) _OperationConnection_edges(ctx context.Context, fiel
 	}
 	res := resTmp.([]*models.OperationEdge)
 	fc.Result = res
-	return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
@@ -7279,7 +7278,7 @@ func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, f
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
@@ -7555,7 +7554,7 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
 	}
 	res := resTmp.(*models.Repository)
 	fc.Result = res
-	return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
+	return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@@ -7696,7 +7695,7 @@ func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graph
 	}
 	res := resTmp.(*models.BugConnection)
 	fc.Result = res
-	return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res)
+	return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
@@ -7734,7 +7733,7 @@ func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.C
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
@@ -7775,7 +7774,7 @@ func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field
 	}
 	res := resTmp.(*models.IdentityConnection)
 	fc.Result = res
-	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
+	return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
@@ -7813,7 +7812,7 @@ func (ec *executionContext) _Repository_identity(ctx context.Context, field grap
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
@@ -7844,7 +7843,7 @@ func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _Repository_validLabels(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
@@ -7885,7 +7884,7 @@ func (ec *executionContext) _Repository_validLabels(ctx context.Context, field g
 	}
 	res := resTmp.(*models.LabelConnection)
 	fc.Result = res
-	return ec.marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelConnection(ctx, field.Selections, res)
+	return ec.marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetStatusOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
@@ -7953,7 +7952,7 @@ func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, fiel
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
@@ -8021,7 +8020,7 @@ func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, fiel
 	}
 	res := resTmp.(models.Status)
 	fc.Result = res
-	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
+	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetStatusTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
@@ -8089,7 +8088,7 @@ func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, f
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
@@ -8157,7 +8156,7 @@ func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, f
 	}
 	res := resTmp.(models.Status)
 	fc.Result = res
-	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
+	return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetTitleOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
@@ -8225,7 +8224,7 @@ func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
@@ -8392,7 +8391,7 @@ func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field grap
 	}
 	res := resTmp.(models.BugWrapper)
 	fc.Result = res
-	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
+	return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
@@ -8494,7 +8493,7 @@ func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, fi
 	}
 	res := resTmp.(models.IdentityWrapper)
 	fc.Result = res
-	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+	return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
@@ -8630,7 +8629,7 @@ func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, f
 	}
 	res := resTmp.([]*models.TimelineItemEdge)
 	fc.Result = res
-	return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx, field.Selections, res)
+	return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
@@ -8698,7 +8697,7 @@ func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context
 	}
 	res := resTmp.(*models.PageInfo)
 	fc.Result = res
-	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 }
 
 func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
@@ -9890,7 +9889,7 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o
 			}
 		case "files":
 			var err error
-			it.Files, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, v)
+			it.Files, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v)
 			if err != nil {
 				return it, err
 			}
@@ -10004,7 +10003,7 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i
 			}
 		case "files":
 			var err error
-			it.Files, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx, v)
+			it.Files, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v)
 			if err != nil {
 				return it, err
 			}
@@ -12756,7 +12755,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
 
 // region    ***************************** type.gotpl *****************************
 
-func (ec *executionContext) unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentInput(ctx context.Context, v interface{}) (models.AddCommentInput, error) {
+func (ec *executionContext) unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx context.Context, v interface{}) (models.AddCommentInput, error) {
 	return ec.unmarshalInputAddCommentInput(ctx, v)
 }
 
@@ -12774,11 +12773,11 @@ func (ec *executionContext) marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichae
 	return ec._AddCommentOperation(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNAddCommentPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNAddCommentPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentPayload) graphql.Marshaler {
 	return ec._AddCommentPayload(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentPayload) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -12802,7 +12801,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
 	return res
 }
 
-func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
+func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -12812,7 +12811,7 @@ func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbug
 	return ec._Bug(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler {
+func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1
@@ -12836,7 +12835,7 @@ func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbu
 			if !isLen1 {
 				defer wg.Done()
 			}
-			ret[i] = ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i])
+			ret[i] = ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i])
 		}
 		if isLen1 {
 			f(i)
@@ -12849,11 +12848,11 @@ func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbu
 	return ret
 }
 
-func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler {
 	return ec._BugConnection(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -12863,11 +12862,11 @@ func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMure
 	return ec._BugConnection(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNBugEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v models.BugEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNBugEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v models.BugEdge) graphql.Marshaler {
 	return ec._BugEdge(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BugEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BugEdge) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1
@@ -12891,7 +12890,7 @@ func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋg
 			if !isLen1 {
 				defer wg.Done()
 			}
-			ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i])
+			ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i])
 		}
 		if isLen1 {
 			f(i)
@@ -12904,7 +12903,7 @@ func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋg
 	return ret
 }
 
-func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -12914,11 +12913,11 @@ func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgit
 	return ec._BugEdge(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNChangeLabelPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNChangeLabelPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v models.ChangeLabelPayload) graphql.Marshaler {
 	return ec._ChangeLabelPayload(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v *models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v *models.ChangeLabelPayload) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -12928,15 +12927,15 @@ func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichael
 	return ec._ChangeLabelPayload(ctx, sel, v)
 }
 
-func (ec *executionContext) unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugInput(ctx context.Context, v interface{}) (models.CloseBugInput, error) {
+func (ec *executionContext) unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx context.Context, v interface{}) (models.CloseBugInput, error) {
 	return ec.unmarshalInputCloseBugInput(ctx, v)
 }
 
-func (ec *executionContext) marshalNCloseBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.CloseBugPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNCloseBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.CloseBugPayload) graphql.Marshaler {
 	return ec._CloseBugPayload(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.CloseBugPayload) graphql.Marshaler {
+func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.CloseBugPayload) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13011,11 +13010,11 @@ func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgit
 	return ec._Comment(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v models.CommentConnection) graphql.Marshaler {
 	return ec._CommentConnection(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13025,11 +13024,11 @@ func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelM
 	return ec._CommentConnection(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNCommentEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v models.CommentEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNCommentEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v models.CommentEdge) graphql.Marshaler {
 	return ec._CommentEdge(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.CommentEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.CommentEdge) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1
@@ -13053,7 +13052,7 @@ func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMure
 			if !isLen1 {
 				defer wg.Done()
 			}
-			ret[i] = ec.marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i])
+			ret[i] = ec.marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i])
 		}
 		if isLen1 {
 			f(i)
@@ -13066,7 +13065,7 @@ func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMure
 	return ret
 }
 
-func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13131,16 +13130,16 @@ func (ec *executionContext) marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMur
 	return ec._CreateOperation(ctx, sel, v)
 }
 
-func (ec *executionContext) unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, v interface{}) (git.Hash, error) {
-	var res git.Hash
+func (ec *executionContext) unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, v interface{}) (repository.Hash, error) {
+	var res repository.Hash
 	return res, res.UnmarshalGQL(v)
 }
 
-func (ec *executionContext) marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, sel ast.SelectionSet, v git.Hash) graphql.Marshaler {
+func (ec *executionContext) marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler {
 	return v
 }
 
-func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx context.Context, v interface{}) ([]git.Hash, error) {
+func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v interface{}) ([]repository.Hash, error) {
 	var vSlice []interface{}
 	if v != nil {
 		if tmp1, ok := v.([]interface{}); ok {
@@ -13150,9 +13149,9 @@ func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgit
 		}
 	}
 	var err error
-	res := make([]git.Hash, len(vSlice))
+	res := make([]repository.Hash, len(vSlice))
 	for i := range vSlice {
-		res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, vSlice[i])
+		res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i])
 		if err != nil {
 			return nil, err
 		}
@@ -13160,16 +13159,16 @@ func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgit
 	return res, nil
 }
 
-func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []git.Hash) graphql.Marshaler {
+func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	for i := range v {
-		ret[i] = ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, sel, v[i])
+		ret[i] = ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i])
 	}
 
 	return ret
 }
 
-func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13179,7 +13178,7 @@ func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑ
 	return ec._Identity(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.IdentityWrapper) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.IdentityWrapper) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1
@@ -13203,7 +13202,7 @@ func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgit
 			if !isLen1 {
 				defer wg.Done()
 			}
-			ret[i] = ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, sel, v[i])
+			ret[i] = ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, sel, v[i])
 		}
 		if isLen1 {
 			f(i)
@@ -13216,11 +13215,11 @@ func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgit
 	return ret
 }
 
-func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v models.IdentityConnection) graphql.Marshaler {
 	return ec._IdentityConnection(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13230,11 +13229,11 @@ func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichael
 	return ec._IdentityConnection(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNIdentityEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v models.IdentityEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentityEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v models.IdentityEdge) graphql.Marshaler {
 	return ec._IdentityEdge(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.IdentityEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.IdentityEdge) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1
@@ -13258,7 +13257,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMur
 			if !isLen1 {
 				defer wg.Done()
 			}
-			ret[i] = ec.marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, sel, v[i])
+			ret[i] = ec.marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, sel, v[i])
 		}
 		if isLen1 {
 			f(i)
@@ -13271,7 +13270,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMur
 	return ret
 }
 
-func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v *models.IdentityEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v *models.IdentityEdge) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13387,20 +13386,20 @@ func (ec *executionContext) marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMicha
 	return ret
 }
 
-func (ec *executionContext) unmarshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx context.Context, v interface{}) (models.LabelChangeStatus, error) {
+func (ec *executionContext) unmarshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx context.Context, v interface{}) (models.LabelChangeStatus, error) {
 	var res models.LabelChangeStatus
 	return res, res.UnmarshalGQL(v)
 }
 
-func (ec *executionContext) marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx context.Context, sel ast.SelectionSet, v models.LabelChangeStatus) graphql.Marshaler {
+func (ec *executionContext) marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx context.Context, sel ast.SelectionSet, v models.LabelChangeStatus) graphql.Marshaler {
 	return v
 }
 
-func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler {
 	return ec._LabelConnection(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler {
+func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler {
 	if v == nil {
 		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
 			ec.Errorf(ctx, "must not be null")
@@ -13410,11 +13409,11 @@ func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMur
 	return ec._LabelConnection(ctx, sel, v)
 }
 
-func (ec *executionContext) marshalNLabelEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v models.LabelEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNLabelEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v models.LabelEdge) graphql.Marshaler {
 	return ec._LabelEdge(ctx, sel, &v)
 }
 
-func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler {
+func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler {
 	ret := make(graphql.Array, len(v))
 	var wg sync.WaitGroup
 	isLen1 := len(v) == 1

api/graphql/models/gen_models.go 🔗

@@ -8,7 +8,7 @@ import (
 	"strconv"
 
 	"github.com/MichaelMure/git-bug/bug"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 // An object that has an author.
@@ -26,7 +26,7 @@ type AddCommentInput struct {
 	// The first message of the new bug.
 	Message string `json:"message"`
 	// The collection of file's hash required for the first message.
-	Files []git.Hash `json:"files"`
+	Files []repository.Hash `json:"files"`
 }
 
 type AddCommentPayload struct {
@@ -145,7 +145,7 @@ type NewBugInput struct {
 	// The first message of the new bug.
 	Message string `json:"message"`
 	// The collection of file's hash required for the first message.
-	Files []git.Hash `json:"files"`
+	Files []repository.Hash `json:"files"`
 }
 
 type NewBugPayload struct {

api/http/git_file_handler.go 🔗

@@ -8,7 +8,7 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/MichaelMure/git-bug/cache"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 // implement a http.Handler that will read and server git blob.
@@ -41,7 +41,7 @@ func (gfh *gitFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
 		return
 	}
 
-	hash := git.Hash(mux.Vars(r)["hash"])
+	hash := repository.Hash(mux.Vars(r)["hash"])
 	if !hash.IsValid() {
 		http.Error(rw, "invalid git hash", http.StatusBadRequest)
 		return

bug/bug.go 🔗

@@ -11,7 +11,6 @@ import (
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
 	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 )
 
@@ -57,8 +56,8 @@ type Bug struct {
 	// Id used as unique identifier
 	id entity.Id
 
-	lastCommit git.Hash
-	rootPack   git.Hash
+	lastCommit repository.Hash
+	rootPack   repository.Hash
 
 	// all the committed operations
 	packs []OperationPack
@@ -509,7 +508,7 @@ func (bug *Bug) NeedCommit() bool {
 func makeMediaTree(pack OperationPack) []repository.TreeEntry {
 	var tree []repository.TreeEntry
 	counter := 0
-	added := make(map[git.Hash]interface{})
+	added := make(map[repository.Hash]interface{})
 
 	for _, ops := range pack.Operations {
 		for _, file := range ops.GetFiles() {

bug/comment.go 🔗

@@ -1,11 +1,12 @@
 package bug
 
 import (
+	"github.com/dustin/go-humanize"
+
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 	"github.com/MichaelMure/git-bug/util/timestamp"
-	"github.com/dustin/go-humanize"
 )
 
 // Comment represent a comment in a Bug
@@ -13,7 +14,7 @@ type Comment struct {
 	id      entity.Id
 	Author  identity.Interface
 	Message string
-	Files   []git.Hash
+	Files   []repository.Hash
 
 	// Creation time of the comment.
 	// Should be used only for human display, never for ordering as we can't rely on it in a distributed system.

bug/op_add_comment.go 🔗

@@ -6,7 +6,7 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 	"github.com/MichaelMure/git-bug/util/text"
 	"github.com/MichaelMure/git-bug/util/timestamp"
 )
@@ -18,7 +18,7 @@ type AddCommentOperation struct {
 	OpBase
 	Message string `json:"message"`
 	// TODO: change for a map[string]util.hash to store the filename ?
-	Files []git.Hash `json:"files"`
+	Files []repository.Hash `json:"files"`
 }
 
 // Sign-post method for gqlgen
@@ -53,7 +53,7 @@ func (op *AddCommentOperation) Apply(snapshot *Snapshot) {
 	snapshot.Timeline = append(snapshot.Timeline, item)
 }
 
-func (op *AddCommentOperation) GetFiles() []git.Hash {
+func (op *AddCommentOperation) GetFiles() []repository.Hash {
 	return op.Files
 }
 
@@ -82,8 +82,8 @@ func (op *AddCommentOperation) UnmarshalJSON(data []byte) error {
 	}
 
 	aux := struct {
-		Message string     `json:"message"`
-		Files   []git.Hash `json:"files"`
+		Message string            `json:"message"`
+		Files   []repository.Hash `json:"files"`
 	}{}
 
 	err = json.Unmarshal(data, &aux)
@@ -101,7 +101,7 @@ func (op *AddCommentOperation) UnmarshalJSON(data []byte) error {
 // Sign post method for gqlgen
 func (op *AddCommentOperation) IsAuthored() {}
 
-func NewAddCommentOp(author identity.Interface, unixTime int64, message string, files []git.Hash) *AddCommentOperation {
+func NewAddCommentOp(author identity.Interface, unixTime int64, message string, files []repository.Hash) *AddCommentOperation {
 	return &AddCommentOperation{
 		OpBase:  newOpBase(AddCommentOp, author, unixTime),
 		Message: message,
@@ -122,7 +122,7 @@ func AddComment(b Interface, author identity.Interface, unixTime int64, message
 	return AddCommentWithFiles(b, author, unixTime, message, nil)
 }
 
-func AddCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []git.Hash) (*AddCommentOperation, error) {
+func AddCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash) (*AddCommentOperation, error) {
 	addCommentOp := NewAddCommentOp(author, unixTime, message, files)
 	if err := addCommentOp.Validate(); err != nil {
 		return nil, err

bug/op_create.go 🔗

@@ -7,7 +7,7 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 	"github.com/MichaelMure/git-bug/util/text"
 	"github.com/MichaelMure/git-bug/util/timestamp"
 )
@@ -17,9 +17,9 @@ var _ Operation = &CreateOperation{}
 // CreateOperation define the initial creation of a bug
 type CreateOperation struct {
 	OpBase
-	Title   string     `json:"title"`
-	Message string     `json:"message"`
-	Files   []git.Hash `json:"files"`
+	Title   string            `json:"title"`
+	Message string            `json:"message"`
+	Files   []repository.Hash `json:"files"`
 }
 
 // Sign-post method for gqlgen
@@ -57,7 +57,7 @@ func (op *CreateOperation) Apply(snapshot *Snapshot) {
 	}
 }
 
-func (op *CreateOperation) GetFiles() []git.Hash {
+func (op *CreateOperation) GetFiles() []repository.Hash {
 	return op.Files
 }
 
@@ -98,9 +98,9 @@ func (op *CreateOperation) UnmarshalJSON(data []byte) error {
 	}
 
 	aux := struct {
-		Title   string     `json:"title"`
-		Message string     `json:"message"`
-		Files   []git.Hash `json:"files"`
+		Title   string            `json:"title"`
+		Message string            `json:"message"`
+		Files   []repository.Hash `json:"files"`
 	}{}
 
 	err = json.Unmarshal(data, &aux)
@@ -119,7 +119,7 @@ func (op *CreateOperation) UnmarshalJSON(data []byte) error {
 // Sign post method for gqlgen
 func (op *CreateOperation) IsAuthored() {}
 
-func NewCreateOp(author identity.Interface, unixTime int64, title, message string, files []git.Hash) *CreateOperation {
+func NewCreateOp(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) *CreateOperation {
 	return &CreateOperation{
 		OpBase:  newOpBase(CreateOp, author, unixTime),
 		Title:   title,
@@ -141,7 +141,7 @@ func Create(author identity.Interface, unixTime int64, title, message string) (*
 	return CreateWithFiles(author, unixTime, title, message, nil)
 }
 
-func CreateWithFiles(author identity.Interface, unixTime int64, title, message string, files []git.Hash) (*Bug, *CreateOperation, error) {
+func CreateWithFiles(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) (*Bug, *CreateOperation, error) {
 	newBug := NewBug()
 	createOp := NewCreateOp(author, unixTime, title, message, files)
 

bug/op_edit_comment.go 🔗

@@ -8,9 +8,9 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
+	"github.com/MichaelMure/git-bug/repository"
 	"github.com/MichaelMure/git-bug/util/timestamp"
 
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/text"
 )
 
@@ -19,9 +19,9 @@ var _ Operation = &EditCommentOperation{}
 // EditCommentOperation will change a comment in the bug
 type EditCommentOperation struct {
 	OpBase
-	Target  entity.Id  `json:"target"`
-	Message string     `json:"message"`
-	Files   []git.Hash `json:"files"`
+	Target  entity.Id         `json:"target"`
+	Message string            `json:"message"`
+	Files   []repository.Hash `json:"files"`
 }
 
 // Sign-post method for gqlgen
@@ -80,7 +80,7 @@ func (op *EditCommentOperation) Apply(snapshot *Snapshot) {
 	}
 }
 
-func (op *EditCommentOperation) GetFiles() []git.Hash {
+func (op *EditCommentOperation) GetFiles() []repository.Hash {
 	return op.Files
 }
 
@@ -113,9 +113,9 @@ func (op *EditCommentOperation) UnmarshalJSON(data []byte) error {
 	}
 
 	aux := struct {
-		Target  entity.Id  `json:"target"`
-		Message string     `json:"message"`
-		Files   []git.Hash `json:"files"`
+		Target  entity.Id         `json:"target"`
+		Message string            `json:"message"`
+		Files   []repository.Hash `json:"files"`
 	}{}
 
 	err = json.Unmarshal(data, &aux)
@@ -134,7 +134,7 @@ func (op *EditCommentOperation) UnmarshalJSON(data []byte) error {
 // Sign post method for gqlgen
 func (op *EditCommentOperation) IsAuthored() {}
 
-func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.Id, message string, files []git.Hash) *EditCommentOperation {
+func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) *EditCommentOperation {
 	return &EditCommentOperation{
 		OpBase:  newOpBase(EditCommentOp, author, unixTime),
 		Target:  target,
@@ -148,7 +148,7 @@ func EditComment(b Interface, author identity.Interface, unixTime int64, target
 	return EditCommentWithFiles(b, author, unixTime, target, message, nil)
 }
 
-func EditCommentWithFiles(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []git.Hash) (*EditCommentOperation, error) {
+func EditCommentWithFiles(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) (*EditCommentOperation, error) {
 	editCommentOp := NewEditCommentOp(author, unixTime, target, message, files)
 	if err := editCommentOp.Validate(); err != nil {
 		return nil, err
@@ -164,7 +164,7 @@ func EditCreateComment(b Interface, author identity.Interface, unixTime int64, m
 }
 
 // Convenience function to edit the body of a bug (the first comment)
-func EditCreateCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []git.Hash) (*EditCommentOperation, error) {
+func EditCreateCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash) (*EditCommentOperation, error) {
 	createOp := b.FirstOp().(*CreateOperation)
 	return EditCommentWithFiles(b, author, unixTime, createOp.Id(), message, files)
 }

bug/operation.go 🔗

@@ -10,7 +10,7 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 // OperationType is an operation type identifier
@@ -37,7 +37,7 @@ type Operation interface {
 	// Time return the time when the operation was added
 	Time() time.Time
 	// GetFiles return the files needed by this operation
-	GetFiles() []git.Hash
+	GetFiles() []repository.Hash
 	// Apply the operation to a Snapshot to create the final state
 	Apply(snapshot *Snapshot)
 	// Validate check if the operation is valid (ex: a title is a single line)
@@ -142,7 +142,7 @@ func (op *OpBase) Time() time.Time {
 }
 
 // GetFiles return the files needed by this operation
-func (op *OpBase) GetFiles() []git.Hash {
+func (op *OpBase) GetFiles() []repository.Hash {
 	return nil
 }
 

bug/operation_pack.go 🔗

@@ -4,9 +4,9 @@ import (
 	"encoding/json"
 	"fmt"
 
-	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/pkg/errors"
+
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 const formatVersion = 1
@@ -21,7 +21,7 @@ type OperationPack struct {
 	Operations []Operation
 
 	// Private field so not serialized
-	commitHash git.Hash
+	commitHash repository.Hash
 }
 
 func (opp *OperationPack) MarshalJSON() ([]byte, error) {
@@ -135,7 +135,7 @@ func (opp *OperationPack) Validate() error {
 
 // Write will serialize and store the OperationPack as a git blob and return
 // its hash
-func (opp *OperationPack) Write(repo repository.ClockedRepo) (git.Hash, error) {
+func (opp *OperationPack) Write(repo repository.ClockedRepo) (repository.Hash, error) {
 	// make sure we don't write invalid data
 	err := opp.Validate()
 	if err != nil {

bug/operation_pack_test.go 🔗

@@ -5,10 +5,11 @@ import (
 	"testing"
 	"time"
 
-	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
+
+	"github.com/MichaelMure/git-bug/identity"
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 func TestOperationPackSerialize(t *testing.T) {
@@ -33,7 +34,7 @@ func TestOperationPackSerialize(t *testing.T) {
 
 	assert.Equal(t, 1, len(opMeta.Metadata))
 
-	opFile := NewAddCommentOp(rene, time.Now().Unix(), "message", []git.Hash{
+	opFile := NewAddCommentOp(rene, time.Now().Unix(), "message", []repository.Hash{
 		"abcdef",
 		"ghijkl",
 	})

bug/operation_test.go 🔗

@@ -8,7 +8,6 @@ import (
 
 	"github.com/MichaelMure/git-bug/identity"
 	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 )
 
 func TestValidate(t *testing.T) {
@@ -46,7 +45,7 @@ func TestValidate(t *testing.T) {
 		},
 
 		NewCreateOp(rene, unix, "multi\nline", "message", nil),
-		NewCreateOp(rene, unix, "title", "message", []git.Hash{git.Hash("invalid")}),
+		NewCreateOp(rene, unix, "title", "message", []repository.Hash{repository.Hash("invalid")}),
 		NewCreateOp(rene, unix, "title\u001b", "message", nil),
 		NewCreateOp(rene, unix, "title", "message\u001b", nil),
 		NewSetTitleOp(rene, unix, "multi\nline", "title1"),
@@ -54,7 +53,7 @@ func TestValidate(t *testing.T) {
 		NewSetTitleOp(rene, unix, "title\u001b", "title2"),
 		NewSetTitleOp(rene, unix, "title", "title2\u001b"),
 		NewAddCommentOp(rene, unix, "message\u001b", nil),
-		NewAddCommentOp(rene, unix, "message", []git.Hash{git.Hash("invalid")}),
+		NewAddCommentOp(rene, unix, "message", []repository.Hash{repository.Hash("invalid")}),
 		NewSetStatusOp(rene, unix, 1000),
 		NewSetStatusOp(rene, unix, 0),
 		NewLabelChangeOperation(rene, unix, []Label{}, []Label{}),

bug/timeline.go 🔗

@@ -5,7 +5,7 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/identity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 	"github.com/MichaelMure/git-bug/util/timestamp"
 )
 
@@ -29,7 +29,7 @@ type CommentTimelineItem struct {
 	id        entity.Id
 	Author    identity.Interface
 	Message   string
-	Files     []git.Hash
+	Files     []repository.Hash
 	CreatedAt timestamp.Timestamp
 	LastEdit  timestamp.Timestamp
 	History   []CommentHistoryStep

cache/bug_cache.go 🔗

@@ -6,7 +6,7 @@ import (
 
 	"github.com/MichaelMure/git-bug/bug"
 	"github.com/MichaelMure/git-bug/entity"
-	"github.com/MichaelMure/git-bug/util/git"
+	"github.com/MichaelMure/git-bug/repository"
 )
 
 var ErrNoMatchingOp = fmt.Errorf("no matching operation found")
@@ -68,7 +68,7 @@ func (c *BugCache) AddComment(message string) (*bug.AddCommentOperation, error)
 	return c.AddCommentWithFiles(message, nil)
 }
 
-func (c *BugCache) AddCommentWithFiles(message string, files []git.Hash) (*bug.AddCommentOperation, error) {
+func (c *BugCache) AddCommentWithFiles(message string, files []repository.Hash) (*bug.AddCommentOperation, error) {
 	author, err := c.repoCache.GetUserIdentity()
 	if err != nil {
 		return nil, err
@@ -77,7 +77,7 @@ func (c *BugCache) AddCommentWithFiles(message string, files []git.Hash) (*bug.A
 	return c.AddCommentRaw(author, time.Now().Unix(), message, files, nil)
 }
 
-func (c *BugCache) AddCommentRaw(author *IdentityCache, unixTime int64, message string, files []git.Hash, metadata map[string]string) (*bug.AddCommentOperation, error) {
+func (c *BugCache) AddCommentRaw(author *IdentityCache, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*bug.AddCommentOperation, error) {
 	op, err := bug.AddCommentWithFiles(c.bug, author.Identity, unixTime, message, files)
 	if err != nil {
 		return nil, err

cache/repo_cache.go 🔗

@@ -21,7 +21,6 @@ import (
 	"github.com/MichaelMure/git-bug/identity"
 	"github.com/MichaelMure/git-bug/query"
 	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/process"
 )
 
@@ -143,12 +142,12 @@ func (c *RepoCache) GetUserEmail() (string, error) {
 }
 
 // ReadData will attempt to read arbitrary data from the given hash
-func (c *RepoCache) ReadData(hash git.Hash) ([]byte, error) {
+func (c *RepoCache) ReadData(hash repository.Hash) ([]byte, error) {
 	return c.repo.ReadData(hash)
 }
 
 // StoreData will store arbitrary data and return the corresponding hash
-func (c *RepoCache) StoreData(data []byte) (git.Hash, error) {
+func (c *RepoCache) StoreData(data []byte) (repository.Hash, error) {
 	return c.repo.StoreData(data)
 }
 
@@ -637,7 +636,7 @@ func (c *RepoCache) NewBug(title string, message string) (*BugCache, *bug.Create
 
 // NewBugWithFiles create a new bug with attached files for the message
 // The new bug is written in the repository (commit)
-func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Hash) (*BugCache, *bug.CreateOperation, error) {
+func (c *RepoCache) NewBugWithFiles(title string, message string, files []repository.Hash) (*BugCache, *bug.CreateOperation, error) {
 	author, err := c.GetUserIdentity()
 	if err != nil {
 		return nil, nil, err
@@ -649,7 +648,7 @@ func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Ha
 // NewBugWithFilesMeta create a new bug with attached files for the message, as
 // well as metadata for the Create operation.
 // The new bug is written in the repository (commit)
-func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []git.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
+func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
 	b, op, err := bug.CreateWithFiles(author.Identity, unixTime, title, message, files)
 	if err != nil {
 		return nil, nil, err

identity/identity.go 🔗

@@ -13,7 +13,6 @@ import (
 
 	"github.com/MichaelMure/git-bug/entity"
 	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 	"github.com/MichaelMure/git-bug/util/timestamp"
 )
@@ -40,7 +39,7 @@ type Identity struct {
 	versions []*Version
 
 	// not serialized
-	lastCommit git.Hash
+	lastCommit repository.Hash
 }
 
 func NewIdentity(name string, email string) *Identity {
@@ -357,7 +356,7 @@ func (i *Identity) Commit(repo repository.ClockedRepo) error {
 			return err
 		}
 
-		var commitHash git.Hash
+		var commitHash repository.Hash
 		if i.lastCommit != "" {
 			commitHash, err = repo.StoreCommitWithParent(treeHash, i.lastCommit)
 		} else {

identity/version.go 🔗

@@ -6,11 +6,11 @@ import (
 	"fmt"
 	"strings"
 
+	"github.com/pkg/errors"
+
 	"github.com/MichaelMure/git-bug/repository"
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 	"github.com/MichaelMure/git-bug/util/text"
-	"github.com/pkg/errors"
 )
 
 const formatVersion = 1
@@ -45,7 +45,7 @@ type Version struct {
 	metadata map[string]string
 
 	// Not serialized
-	commitHash git.Hash
+	commitHash repository.Hash
 }
 
 type VersionJSON struct {
@@ -174,7 +174,7 @@ func (v *Version) Validate() error {
 
 // Write will serialize and store the Version as a git blob and return
 // its hash
-func (v *Version) Write(repo repository.Repo) (git.Hash, error) {
+func (v *Version) Write(repo repository.Repo) (repository.Hash, error) {
 	// make sure we don't write invalid data
 	err := v.Validate()
 	if err != nil {

repository/git.go 🔗

@@ -10,7 +10,6 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 )
 
@@ -218,16 +217,16 @@ func (repo *GitRepo) PushRefs(remote string, refSpec string) (string, error) {
 }
 
 // StoreData will store arbitrary data and return the corresponding hash
-func (repo *GitRepo) StoreData(data []byte) (git.Hash, error) {
+func (repo *GitRepo) StoreData(data []byte) (Hash, error) {
 	var stdin = bytes.NewReader(data)
 
 	stdout, err := repo.runGitCommandWithStdin(stdin, "hash-object", "--stdin", "-w")
 
-	return git.Hash(stdout), err
+	return Hash(stdout), err
 }
 
 // ReadData will attempt to read arbitrary data from the given hash
-func (repo *GitRepo) ReadData(hash git.Hash) ([]byte, error) {
+func (repo *GitRepo) ReadData(hash Hash) ([]byte, error) {
 	var stdout bytes.Buffer
 	var stderr bytes.Buffer
 
@@ -241,7 +240,7 @@ func (repo *GitRepo) ReadData(hash git.Hash) ([]byte, error) {
 }
 
 // StoreTree will store a mapping key-->Hash as a Git tree
-func (repo *GitRepo) StoreTree(entries []TreeEntry) (git.Hash, error) {
+func (repo *GitRepo) StoreTree(entries []TreeEntry) (Hash, error) {
 	buffer := prepareTreeEntries(entries)
 
 	stdout, err := repo.runGitCommandWithStdin(&buffer, "mktree")
@@ -250,22 +249,22 @@ func (repo *GitRepo) StoreTree(entries []TreeEntry) (git.Hash, error) {
 		return "", err
 	}
 
-	return git.Hash(stdout), nil
+	return Hash(stdout), nil
 }
 
 // StoreCommit will store a Git commit with the given Git tree
-func (repo *GitRepo) StoreCommit(treeHash git.Hash) (git.Hash, error) {
+func (repo *GitRepo) StoreCommit(treeHash Hash) (Hash, error) {
 	stdout, err := repo.runGitCommand("commit-tree", string(treeHash))
 
 	if err != nil {
 		return "", err
 	}
 
-	return git.Hash(stdout), nil
+	return Hash(stdout), nil
 }
 
 // StoreCommitWithParent will store a Git commit with the given Git tree
-func (repo *GitRepo) StoreCommitWithParent(treeHash git.Hash, parent git.Hash) (git.Hash, error) {
+func (repo *GitRepo) StoreCommitWithParent(treeHash Hash, parent Hash) (Hash, error) {
 	stdout, err := repo.runGitCommand("commit-tree", string(treeHash),
 		"-p", string(parent))
 
@@ -273,11 +272,11 @@ func (repo *GitRepo) StoreCommitWithParent(treeHash git.Hash, parent git.Hash) (
 		return "", err
 	}
 
-	return git.Hash(stdout), nil
+	return Hash(stdout), nil
 }
 
 // UpdateRef will create or update a Git reference
-func (repo *GitRepo) UpdateRef(ref string, hash git.Hash) error {
+func (repo *GitRepo) UpdateRef(ref string, hash Hash) error {
 	_, err := repo.runGitCommand("update-ref", ref, string(hash))
 
 	return err
@@ -319,7 +318,7 @@ func (repo *GitRepo) CopyRef(source string, dest string) error {
 }
 
 // ListCommits will return the list of commit hashes of a ref, in chronological order
-func (repo *GitRepo) ListCommits(ref string) ([]git.Hash, error) {
+func (repo *GitRepo) ListCommits(ref string) ([]Hash, error) {
 	stdout, err := repo.runGitCommand("rev-list", "--first-parent", "--reverse", ref)
 
 	if err != nil {
@@ -328,9 +327,9 @@ func (repo *GitRepo) ListCommits(ref string) ([]git.Hash, error) {
 
 	split := strings.Split(stdout, "\n")
 
-	casted := make([]git.Hash, len(split))
+	casted := make([]Hash, len(split))
 	for i, line := range split {
-		casted[i] = git.Hash(line)
+		casted[i] = Hash(line)
 	}
 
 	return casted, nil
@@ -338,7 +337,7 @@ func (repo *GitRepo) ListCommits(ref string) ([]git.Hash, error) {
 }
 
 // ReadTree will return the list of entries in a Git tree
-func (repo *GitRepo) ReadTree(hash git.Hash) ([]TreeEntry, error) {
+func (repo *GitRepo) ReadTree(hash Hash) ([]TreeEntry, error) {
 	stdout, err := repo.runGitCommand("ls-tree", string(hash))
 
 	if err != nil {
@@ -349,25 +348,25 @@ func (repo *GitRepo) ReadTree(hash git.Hash) ([]TreeEntry, error) {
 }
 
 // FindCommonAncestor will return the last common ancestor of two chain of commit
-func (repo *GitRepo) FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (git.Hash, error) {
+func (repo *GitRepo) FindCommonAncestor(hash1 Hash, hash2 Hash) (Hash, error) {
 	stdout, err := repo.runGitCommand("merge-base", string(hash1), string(hash2))
 
 	if err != nil {
 		return "", err
 	}
 
-	return git.Hash(stdout), nil
+	return Hash(stdout), nil
 }
 
 // GetTreeHash return the git tree hash referenced in a commit
-func (repo *GitRepo) GetTreeHash(commit git.Hash) (git.Hash, error) {
+func (repo *GitRepo) GetTreeHash(commit Hash) (Hash, error) {
 	stdout, err := repo.runGitCommand("rev-parse", string(commit)+"^{tree}")
 
 	if err != nil {
 		return "", err
 	}
 
-	return git.Hash(stdout), nil
+	return Hash(stdout), nil
 }
 
 // GetOrCreateClock return a Lamport clock stored in the Repo.

util/git/hash.go → repository/hash.go 🔗

@@ -1,4 +1,4 @@
-package git
+package repository
 
 import (
 	"fmt"

repository/mock_repo.go 🔗

@@ -5,7 +5,6 @@ import (
 	"fmt"
 	"strings"
 
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 )
 
@@ -16,26 +15,26 @@ var _ TestedRepo = &mockRepoForTest{}
 type mockRepoForTest struct {
 	config       *MemConfig
 	globalConfig *MemConfig
-	blobs        map[git.Hash][]byte
-	trees        map[git.Hash]string
-	commits      map[git.Hash]commit
-	refs         map[string]git.Hash
+	blobs        map[Hash][]byte
+	trees        map[Hash]string
+	commits      map[Hash]commit
+	refs         map[string]Hash
 	clocks       map[string]lamport.Clock
 }
 
 type commit struct {
-	treeHash git.Hash
-	parent   git.Hash
+	treeHash Hash
+	parent   Hash
 }
 
 func NewMockRepoForTest() *mockRepoForTest {
 	return &mockRepoForTest{
 		config:       NewMemConfig(),
 		globalConfig: NewMemConfig(),
-		blobs:        make(map[git.Hash][]byte),
-		trees:        make(map[git.Hash]string),
-		commits:      make(map[git.Hash]commit),
-		refs:         make(map[string]git.Hash),
+		blobs:        make(map[Hash][]byte),
+		trees:        make(map[Hash]string),
+		commits:      make(map[Hash]commit),
+		refs:         make(map[string]Hash),
 		clocks:       make(map[string]lamport.Clock),
 	}
 }
@@ -85,14 +84,14 @@ func (r *mockRepoForTest) FetchRefs(remote string, refSpec string) (string, erro
 	return "", nil
 }
 
-func (r *mockRepoForTest) StoreData(data []byte) (git.Hash, error) {
+func (r *mockRepoForTest) StoreData(data []byte) (Hash, error) {
 	rawHash := sha1.Sum(data)
-	hash := git.Hash(fmt.Sprintf("%x", rawHash))
+	hash := Hash(fmt.Sprintf("%x", rawHash))
 	r.blobs[hash] = data
 	return hash, nil
 }
 
-func (r *mockRepoForTest) ReadData(hash git.Hash) ([]byte, error) {
+func (r *mockRepoForTest) ReadData(hash Hash) ([]byte, error) {
 	data, ok := r.blobs[hash]
 
 	if !ok {
@@ -102,27 +101,27 @@ func (r *mockRepoForTest) ReadData(hash git.Hash) ([]byte, error) {
 	return data, nil
 }
 
-func (r *mockRepoForTest) StoreTree(entries []TreeEntry) (git.Hash, error) {
+func (r *mockRepoForTest) StoreTree(entries []TreeEntry) (Hash, error) {
 	buffer := prepareTreeEntries(entries)
 	rawHash := sha1.Sum(buffer.Bytes())
-	hash := git.Hash(fmt.Sprintf("%x", rawHash))
+	hash := Hash(fmt.Sprintf("%x", rawHash))
 	r.trees[hash] = buffer.String()
 
 	return hash, nil
 }
 
-func (r *mockRepoForTest) StoreCommit(treeHash git.Hash) (git.Hash, error) {
+func (r *mockRepoForTest) StoreCommit(treeHash Hash) (Hash, error) {
 	rawHash := sha1.Sum([]byte(treeHash))
-	hash := git.Hash(fmt.Sprintf("%x", rawHash))
+	hash := Hash(fmt.Sprintf("%x", rawHash))
 	r.commits[hash] = commit{
 		treeHash: treeHash,
 	}
 	return hash, nil
 }
 
-func (r *mockRepoForTest) StoreCommitWithParent(treeHash git.Hash, parent git.Hash) (git.Hash, error) {
+func (r *mockRepoForTest) StoreCommitWithParent(treeHash Hash, parent Hash) (Hash, error) {
 	rawHash := sha1.Sum([]byte(treeHash + parent))
-	hash := git.Hash(fmt.Sprintf("%x", rawHash))
+	hash := Hash(fmt.Sprintf("%x", rawHash))
 	r.commits[hash] = commit{
 		treeHash: treeHash,
 		parent:   parent,
@@ -130,7 +129,7 @@ func (r *mockRepoForTest) StoreCommitWithParent(treeHash git.Hash, parent git.Ha
 	return hash, nil
 }
 
-func (r *mockRepoForTest) UpdateRef(ref string, hash git.Hash) error {
+func (r *mockRepoForTest) UpdateRef(ref string, hash Hash) error {
 	r.refs[ref] = hash
 	return nil
 }
@@ -163,8 +162,8 @@ func (r *mockRepoForTest) ListRefs(refspec string) ([]string, error) {
 	return keys, nil
 }
 
-func (r *mockRepoForTest) ListCommits(ref string) ([]git.Hash, error) {
-	var hashes []git.Hash
+func (r *mockRepoForTest) ListCommits(ref string) ([]Hash, error) {
+	var hashes []Hash
 
 	hash := r.refs[ref]
 
@@ -175,14 +174,14 @@ func (r *mockRepoForTest) ListCommits(ref string) ([]git.Hash, error) {
 			break
 		}
 
-		hashes = append([]git.Hash{hash}, hashes...)
+		hashes = append([]Hash{hash}, hashes...)
 		hash = commit.parent
 	}
 
 	return hashes, nil
 }
 
-func (r *mockRepoForTest) ReadTree(hash git.Hash) ([]TreeEntry, error) {
+func (r *mockRepoForTest) ReadTree(hash Hash) ([]TreeEntry, error) {
 	var data string
 
 	data, ok := r.trees[hash]
@@ -205,8 +204,8 @@ func (r *mockRepoForTest) ReadTree(hash git.Hash) ([]TreeEntry, error) {
 	return readTreeEntries(data)
 }
 
-func (r *mockRepoForTest) FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (git.Hash, error) {
-	ancestor1 := []git.Hash{hash1}
+func (r *mockRepoForTest) FindCommonAncestor(hash1 Hash, hash2 Hash) (Hash, error) {
+	ancestor1 := []Hash{hash1}
 
 	for hash1 != "" {
 		c, ok := r.commits[hash1]
@@ -237,7 +236,7 @@ func (r *mockRepoForTest) FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (gi
 	}
 }
 
-func (r *mockRepoForTest) GetTreeHash(commit git.Hash) (git.Hash, error) {
+func (r *mockRepoForTest) GetTreeHash(commit Hash) (Hash, error) {
 	c, ok := r.commits[commit]
 	if !ok {
 		return "", fmt.Errorf("unknown commit")

repository/repo.go 🔗

@@ -6,7 +6,6 @@ import (
 	"errors"
 	"strings"
 
-	"github.com/MichaelMure/git-bug/util/git"
 	"github.com/MichaelMure/git-bug/util/lamport"
 )
 
@@ -58,31 +57,31 @@ type Repo interface {
 	PushRefs(remote string, refSpec string) (string, error)
 
 	// StoreData will store arbitrary data and return the corresponding hash
-	StoreData(data []byte) (git.Hash, error)
+	StoreData(data []byte) (Hash, error)
 
 	// ReadData will attempt to read arbitrary data from the given hash
-	ReadData(hash git.Hash) ([]byte, error)
+	ReadData(hash Hash) ([]byte, error)
 
 	// StoreTree will store a mapping key-->Hash as a Git tree
-	StoreTree(mapping []TreeEntry) (git.Hash, error)
+	StoreTree(mapping []TreeEntry) (Hash, error)
 
 	// ReadTree will return the list of entries in a Git tree
-	ReadTree(hash git.Hash) ([]TreeEntry, error)
+	ReadTree(hash Hash) ([]TreeEntry, error)
 
 	// StoreCommit will store a Git commit with the given Git tree
-	StoreCommit(treeHash git.Hash) (git.Hash, error)
+	StoreCommit(treeHash Hash) (Hash, error)
 
 	// StoreCommit will store a Git commit with the given Git tree
-	StoreCommitWithParent(treeHash git.Hash, parent git.Hash) (git.Hash, error)
+	StoreCommitWithParent(treeHash Hash, parent Hash) (Hash, error)
 
 	// GetTreeHash return the git tree hash referenced in a commit
-	GetTreeHash(commit git.Hash) (git.Hash, error)
+	GetTreeHash(commit Hash) (Hash, error)
 
 	// FindCommonAncestor will return the last common ancestor of two chain of commit
-	FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (git.Hash, error)
+	FindCommonAncestor(commit1 Hash, commit2 Hash) (Hash, error)
 
 	// UpdateRef will create or update a Git reference
-	UpdateRef(ref string, hash git.Hash) error
+	UpdateRef(ref string, hash Hash) error
 
 	// ListRefs will return a list of Git ref matching the given refspec
 	ListRefs(refspec string) ([]string, error)
@@ -94,7 +93,7 @@ type Repo interface {
 	CopyRef(source string, dest string) error
 
 	// ListCommits will return the list of tree hashes of a ref, in chronological order
-	ListCommits(ref string) ([]git.Hash, error)
+	ListCommits(ref string) ([]Hash, error)
 }
 
 // ClockedRepo is a Repo that also has Lamport clocks

repository/repo_testing.go 🔗

@@ -9,8 +9,6 @@ import (
 
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
-
-	"github.com/MichaelMure/git-bug/util/git"
 )
 
 func CleanupTestRepos(repos ...Repo) {
@@ -158,7 +156,7 @@ func RepoTest(t *testing.T, creator RepoCreator, cleaner RepoCleaner) {
 
 		commits, err := repo.ListCommits("refs/bugs/ref2")
 		require.NoError(t, err)
-		assert.Equal(t, []git.Hash{commit1, commit2}, commits)
+		assert.Equal(t, []Hash{commit1, commit2}, commits)
 
 		// Graph
 

repository/tree_entry.go 🔗

@@ -3,13 +3,11 @@ package repository
 import (
 	"fmt"
 	"strings"
-
-	"github.com/MichaelMure/git-bug/util/git"
 )
 
 type TreeEntry struct {
 	ObjectType ObjectType
-	Hash       git.Hash
+	Hash       Hash
 	Name       string
 }
 
@@ -34,7 +32,7 @@ func ParseTreeEntry(line string) (TreeEntry, error) {
 		return TreeEntry{}, err
 	}
 
-	hash := git.Hash(fields[2])
+	hash := Hash(fields[2])
 	name := strings.Join(fields[3:], "")
 
 	return TreeEntry{

repository/tree_entry_test.go 🔗

@@ -4,14 +4,12 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-
-	"github.com/MichaelMure/git-bug/util/git"
 )
 
 func TestTreeEntryFormat(t *testing.T) {
 	entries := []TreeEntry{
-		{Blob, git.Hash("a85730cf5287d40a1e32d3a671ba2296c73387cb"), "name"},
-		{Tree, git.Hash("a85730cf5287d40a1e32d3a671ba2296c73387cb"), "name"},
+		{Blob, Hash("a85730cf5287d40a1e32d3a671ba2296c73387cb"), "name"},
+		{Tree, Hash("a85730cf5287d40a1e32d3a671ba2296c73387cb"), "name"},
 	}
 
 	for _, entry := range entries {