configure_remote

Function configure_remote 

Source
pub fn configure_remote<'r>(
    repo: &'r Repository,
    name: &str,
    fetch: &Url,
    push: &Url,
) -> Result<Remote<'r>, Error>
Expand description

Configure a repository’s radicle remote.

The entry for this remote will be:

[remote.<name>]
  url = <fetch>
  pushurl = <push>
  fetch = +refs/heads/*:refs/remotes/<name>/*
  fetch = +refs/tags/*:refs/remotes/<name>/tags/*
  tagOpt = --no-tags
  pruneTags = false

Because of the +refs/tags/*:… refspec, set:

  1. pruneTags = false to ensure that git does not delete tags because the remote does not have them. Tags for a Radicle repository are synthesised by canonical refs and thus, the rad remote will handle fetching them.
  2. tagOpt = --no-tags to ensure that tags are not fetched and stored under refs/tags, again, because these are fetched by the rad remote.