git-remote-rad: Allow pushing from bare repositories
Bare git repositories are meant to fetch into/push from and fetching works, but pushing from a bare repo into radicle-storage was prohibited. This is a problem for me as I want to use `jj`, which uses a bare git repository in the back (when not co-located into a "normal" git repository).
This commit is contained in:
parent
271ef497d7
commit
da72557cf7
|
|
@ -855,9 +855,7 @@ fn push_ref(
|
|||
// Nb. The *force* indicator (`+`) is processed by Git tooling before we even reach this code.
|
||||
// This happens during the `list for-push` phase.
|
||||
let refspec = git::Refspec { src, dst, force };
|
||||
let repo = working.workdir().ok_or(Error::BareRepository {
|
||||
path: working.path().to_path_buf(),
|
||||
})?;
|
||||
let repo = working.workdir().unwrap_or_else(|| working.path());
|
||||
|
||||
radicle::git::run::<_, _, &str, &str>(
|
||||
repo,
|
||||
|
|
|
|||
Loading…
Reference in New Issue