refs: resolve conflict between local/remote repos

Add the functionality to use the same name for refs in local and remote
repos. This helps users keep track of local refs of remote origin, much
like local and remote git branches.

Previously, when a local ref is specified, resolve_refspec would fall
back to searching through remote repos if the ref is not found locally.
This function now takes an extra flag to specify whether it should
search through remote repos. Additionally, ostree_repo_resove_rev_ext
was added to call resolve_refspec with fallback_remote being false, so
refs --create would no longer complain when trying to create a local
ref of the same name as a remote one.

Fix remote repo parsing not being handled correctly on refs --create.

Closes: #363
Approved by: jlebon
This commit is contained in:
Yu Qi Zhang authored and Atomic Bot committed 2016-06-23 19:52:26 +00:00
1 parent fc4a7ec35e
commit 02a2b689dd
6 files changed
+99 -28

No files matched your search

+1
View File
@@ -300,6 +300,7 @@ ostree_repo_write_content_trusted
ostree_repo_write_content_async
ostree_repo_write_content_finish
ostree_repo_resolve_rev
ostree_repo_resolve_rev_ext
ostree_repo_list_refs
ostree_repo_list_refs_ext
ostree_repo_remote_list_refs