cli: Make sure to configure checkouts properly
We were configure correctly on `rad init`, but not `rad checkout`.
This commit is contained in:
parent
1388601cb6
commit
54551b1174
|
|
@ -11,6 +11,8 @@ $ cat .git/config
|
||||||
repositoryformatversion = 0
|
repositoryformatversion = 0
|
||||||
filemode = true
|
filemode = true
|
||||||
logallrefupdates = true
|
logallrefupdates = true
|
||||||
|
[push]
|
||||||
|
default = upstream
|
||||||
[remote "rad"]
|
[remote "rad"]
|
||||||
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
fetch = +refs/heads/*:refs/remotes/rad/*
|
fetch = +refs/heads/*:refs/remotes/rad/*
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ $ cat .git/config
|
||||||
ignorecase = true
|
ignorecase = true
|
||||||
precomposeunicode = true
|
precomposeunicode = true
|
||||||
logallrefupdates = true
|
logallrefupdates = true
|
||||||
|
[push]
|
||||||
|
default = upstream
|
||||||
[remote "rad"]
|
[remote "rad"]
|
||||||
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
fetch = +refs/heads/*:refs/remotes/rad/*
|
fetch = +refs/heads/*:refs/remotes/rad/*
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,8 @@ pub fn checkout<P: AsRef<Path>, S: storage::ReadStorage>(
|
||||||
let repo = git2::Repository::init_opts(path.as_ref(), &opts)?;
|
let repo = git2::Repository::init_opts(path.as_ref(), &opts)?;
|
||||||
let url = git::Url::from(proj);
|
let url = git::Url::from(proj);
|
||||||
|
|
||||||
|
// Configure repository for radicle.
|
||||||
|
git::configure_repository(&repo)?;
|
||||||
// Configure and fetch all refs from remote.
|
// Configure and fetch all refs from remote.
|
||||||
git::configure_remote(
|
git::configure_remote(
|
||||||
&repo,
|
&repo,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue