Permalink
Browse files

Use re: instead of regexp.

  • Loading branch information...
1 parent 86eef29 commit 1a194a0d8e83b7324f8139f75ef12d533805a627 @mojombo mojombo committed Jan 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/git_object.erl
View
@@ -20,7 +20,7 @@ parse_object(_Sha, Data, tree) ->
parse_object(Sha, Data, commit) ->
CommitString = binary_to_list(Data),
- {match, Offset, Len} = regexp:first_match(CommitString, "\n\n"),
+ {match, [{Offset, Len}]} = re:run(CommitString, "\n\n"),
{Meta, Message} = lists:split(Offset + Len - 1, CommitString),
Parents = parse_commit_parents(Meta),
Tree = extract_one(Meta, "tree (.*)"),

0 comments on commit 1a194a0

Please sign in to comment.