Skip to content

Commit

Permalink
Rename GitRekt.Pack to GitRekt.Packfile
Browse files Browse the repository at this point in the history
See issue #1 for more details.
  • Loading branch information
redrabbit committed Dec 8, 2017
1 parent 7c73fad commit 6d46095
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule GitRekt.Pack do
defmodule GitRekt.Packfile do
@moduledoc """
Conveniences for reading and writting Git pack files.
"""
Expand Down
6 changes: 3 additions & 3 deletions apps/gitrekt/lib/gitrekt/wire_protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule GitRekt.WireProtocol do
"""

alias GitRekt.Git
alias GitRekt.Pack
alias GitRekt.Packfile

@server_capabilities ~w(report-status delete-refs)

Expand All @@ -27,7 +27,7 @@ defmodule GitRekt.WireProtocol do
def upload_pack(repo, pkt) do
case parse_upload_pkt(pkt) do
{:done, wants, _shallows, _haves, _caps} ->
encode(["NAK", Pack.create(repo, wants)])
encode(["NAK", Packfile.create(repo, wants)])
end
end

Expand Down Expand Up @@ -128,7 +128,7 @@ defmodule GitRekt.WireProtocol do

defp pkt_next(""), do: {:halt, nil}
defp pkt_next("0000" <> rest), do: {[:flush], rest}
defp pkt_next(<<"PACK", version::32, count::32, data::binary>>), do: Pack.extract(version, count, data)
defp pkt_next(<<"PACK", version::32, count::32, data::binary>>), do: Packfile.extract(version, count, data)
defp pkt_next(<<hex::bytes-size(4), payload::binary>>) do
{payload_size, ""} = Integer.parse(hex, 16)
data_size = payload_size - 4
Expand Down

0 comments on commit 6d46095

Please sign in to comment.