bin/refs: Disallow aliases to remote refs
It can't really work in general; the client and server would have to agree on the name of the remote. Closes: https://github.com/ostreedev/ostree/issues/1342 Closes: #1381 Approved by: jlebon
This commit is contained in:
1 parent
85f388e058
commit
b822f337b5
2 files changed
+10
-1
No files matched your search
@@ -223,6 +223,8 @@ static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellab
|
||||
|
||||
if (opt_alias)
|
||||
{
|
||||
if (remote)
|
||||
return glnx_throw (error, "Cannot create alias to remote ref: %s", remote);
|
||||
if (!ostree_repo_set_alias_ref_immediate (repo, remote, ref, refspec_prefix,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
Reference in new issue
Block a user