Skip to content
Browse files

Make our future lives easier by introducing a git record.

  • Loading branch information...
1 parent b2691f0 commit 376e9156a037e1b7006a8fbd67fec02c6767654c @mojombo mojombo committed
Showing with 3 additions and 3 deletions.
  1. +2 −3 src/git.erl
  2. +1 −0 src/git.hrl
View
5 src/git.erl
@@ -16,7 +16,7 @@
open(Path) ->
% normalize the path (look for .git, etc)
- {Path}.
+ #git{path = Path}.
%references(Git) ->
% read all the refs from disk/packed-refs and return an array
@@ -53,8 +53,7 @@ object(Git, Sha) ->
git_object:parse_object(Sha, Data, Type).
git_dir(Git) ->
- {Path} = Git,
- Path.
+ Git#git.path.
object_exists(Git, ObjectSha) ->
LoosePath = get_loose_object_path(Git, ObjectSha),
View
1 src/git.hrl
@@ -1,3 +1,4 @@
+-record(git, {path}).
-record(index, {header,
version,

0 comments on commit 376e915

Please sign in to comment.
Something went wrong with that request. Please try again.