Xgit v0.5.0 Xgit.Plumbing.SymbolicRef.Put View Source
Modify a symbolic ref in a repo.
Analogous to the two-argument form of
git symbolic-ref
.
Link to this section Summary
Functions
Creates or updates a symbolic ref to point at a specific branch.
Link to this section Types
reason()
View Sourcereason() :: :invalid_repository | Xgit.Repository.put_ref_reason()
Reason codes that can be returned by run/2
.
Link to this section Functions
run(repository, name, new_target, opts \\ [])
View Sourcerun( repository :: Xgit.Repository.t(), name :: Xgit.Core.Ref.name(), new_target :: Xgit.Core.Ref.name(), opts :: Keyword.t() ) :: :ok | {:error, reason()}
Creates or updates a symbolic ref to point at a specific branch.
Parameters
repository
is the Xgit.Repository
(PID) in which to create the symbolic reference.
name
is the name of the symbolic reference to create or update. (See t/Xgit.Core.Ref.name
.)
new_target
is the name of the reference that should be targeted by this symbolic reference.
This reference need not exist.
Options
TO DO: Add option to specify ref log message. https://github.com/elixir-git/xgit/issues/251
Return Value
:ok
if written successfully.
{:error, :invalid_repository}
if repository
doesn't represent a valid
Xgit.Repository
process.
Reason codes may also come from the following functions: