diff options
author | Colin Walters <walters@verbum.org> | 2017-12-14 13:13:42 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-14 22:22:39 +0000 |
commit | b822f337b541e3cc8be3454f0e423e0874209b82 (patch) | |
tree | 533b98b511608160ba193e5a2e52541bd3f4d894 /src/ostree/ot-builtin-refs.c | |
parent | 85f388e05883d4a0e55d3dfcc5b8763c20dfba51 (diff) | |
download | ostree-b822f337b541e3cc8be3454f0e423e0874209b82.tar.gz |
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
Diffstat (limited to 'src/ostree/ot-builtin-refs.c')
-rw-r--r-- | src/ostree/ot-builtin-refs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c index 3508a529..be5cf9d4 100644 --- a/src/ostree/ot-builtin-refs.c +++ b/src/ostree/ot-builtin-refs.c @@ -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; |