Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native implementation for Git server-side commands. #1

Closed
2 tasks done
redrabbit opened this issue Nov 6, 2017 · 1 comment
Closed
2 tasks done

Native implementation for Git server-side commands. #1

redrabbit opened this issue Nov 6, 2017 · 1 comment

Comments

@redrabbit
Copy link
Owner

redrabbit commented Nov 6, 2017

We want to drop the dependencies to the Git tools. Bindings for libgit2 should be the only thing we need.

For this to happen, we must implement:

  • Git upload-pack server side command.
  • Git receive-pack server side command.

Checkout the Packfile transfer protocols documentation.

redrabbit added a commit that referenced this issue Nov 30, 2017
See issues #1 and #3 for more details.
redrabbit added a commit that referenced this issue Nov 30, 2017
See issue #1 for more details.
redrabbit added a commit that referenced this issue Dec 1, 2017
redrabbit added a commit that referenced this issue Dec 1, 2017
See issue #1 and #3 for more details.
redrabbit added a commit that referenced this issue Dec 1, 2017
redrabbit added a commit that referenced this issue Dec 1, 2017
See issue #1 for more details.
redrabbit added a commit that referenced this issue Dec 1, 2017
See issue #1 for more details.
@redrabbit
Copy link
Owner Author

Closing this as we now have basic git-upload-pack and git-receive-pack capabilities.

See #8 for support of various server capabilities.

redrabbit added a commit that referenced this issue Dec 8, 2017
redrabbit added a commit that referenced this issue Dec 8, 2017
See issue #1 for more details.
redrabbit added a commit that referenced this issue Dec 8, 2017
redrabbit added a commit that referenced this issue Dec 15, 2017
See issues #1 and #8 for more details.
redrabbit added a commit that referenced this issue Dec 15, 2017
redrabbit added a commit that referenced this issue Dec 15, 2017
See issues #1 and #8 for more details.
redrabbit added a commit that referenced this issue Dec 15, 2017
See issues #1 and #8 fore more details.
redrabbit added a commit that referenced this issue Sep 13, 2021
When calling GitRekt.GitAgent from other nodes, NIF resources might be
garbage collected between two calls:

    {:ok, head} = GitRekt.GitAgent.head(agent)
    {:ok, commit} = GitRekt.GitAgent.peel(agent, head) #1
    {:ok, message} = GitRekt.GitAgent.commit_message(agent, message) #2

In the above example, between #1 and #2 the agent process might garbage
collect the commit. This could lead lead to a bad argument error in #2.

In order to counter this, GitRekt.GiAgent stores a set of borrowed NIF
resources.  This way the resources are reference counted and available
between consecutive calls. Note that the references are dropped once a
:DOWN message is received from a given client process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant