Skip to content

Commit

Permalink
Use re: instead of regexp.
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Jan 7, 2010
1 parent 86eef29 commit 1a194a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/git_object.erl
Expand Up @@ -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 (.*)"),
Expand Down

0 comments on commit 1a194a0

Please sign in to comment.