summaryrefslogtreecommitdiff
path: root/tests/refs
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-11-08 20:00:17 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-08 20:00:17 +0100
commit82374d9825040914a3cfd8ceeaf60f76b93fe638 (patch)
tree1916da249f0bb5d25d77ad7bec7bb1a912816f53 /tests/refs
parent4e1b3b3b7186b017223b8302a51289ff92ccba25 (diff)
downloadlibgit2-82374d9825040914a3cfd8ceeaf60f76b93fe638.tar.gz
branch: add getter for the upstream remote name
This gets the value from branch.<foo>.remote.
Diffstat (limited to 'tests/refs')
-rw-r--r--tests/refs/branches/upstream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/refs/branches/upstream.c b/tests/refs/branches/upstream.c
index ce3569813..abf7933d3 100644
--- a/tests/refs/branches/upstream.c
+++ b/tests/refs/branches/upstream.c
@@ -61,6 +61,15 @@ void test_refs_branches_upstream__trying_to_retrieve_a_remote_tracking_reference
cl_assert_equal_i(GIT_ENOTFOUND, git_branch_upstream(&upstream, branch));
}
+void test_refs_branches_upstream__upstream_remote(void)
+{
+ git_buf buf = GIT_BUF_INIT;
+
+ cl_git_pass(git_branch_upstream_remote(&buf, repo, "refs/heads/master"));
+ cl_assert_equal_s("test", buf.ptr);
+ git_buf_free(&buf);
+}
+
static void assert_merge_and_or_remote_key_missing(git_repository *repository, const git_commit *target, const char *entry_name)
{
git_reference *branch;