core: Look up refs like origin/foo correctly again

We want to support both "bare" lookups where "foo" can be local, or in
any remote, as well as prefixed ones for a specific remote.

This fixes ostree-pull noticing that nothing has changed.
This commit is contained in:
Colin Walters 2012-02-24 16:08:34 -05:00
parent a90e091037
commit 51916a7002
2 changed files with 16 additions and 11 deletions

View File

@ -380,6 +380,12 @@ ostree_repo_resolve_rev (OstreeRepo *self,
{
child = g_file_resolve_relative_path (priv->local_heads_dir, rev);
if (!g_file_query_exists (child, NULL))
{
g_clear_object (&child);
child = g_file_resolve_relative_path (priv->remote_heads_dir, rev);
if (!g_file_query_exists (child, NULL))
{
g_clear_object (&child);
@ -399,6 +405,7 @@ ostree_repo_resolve_rev (OstreeRepo *self,
g_clear_object (&child);
}
}
}
if (child)
{

View File

@ -463,7 +463,6 @@ ostree_builtin_pull (int argc, char **argv, GFile *repo_path, GError **error)
OstreeRepo *repo = NULL;
const char *remote;
const char *branch;
char *remote_branch_ref_path = NULL;
char *key = NULL;
char *baseurl = NULL;
char *refpath = NULL;
@ -566,7 +565,6 @@ ostree_builtin_pull (int argc, char **argv, GFile *repo_path, GError **error)
g_free (original_rev);
g_free (baseurl);
g_free (refpath);
g_free (remote_branch_ref_path);
g_clear_object (&soup);
if (base_uri)
soup_uri_free (base_uri);