diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-08 20:00:17 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-08 20:00:17 +0100 |
commit | 82374d9825040914a3cfd8ceeaf60f76b93fe638 (patch) | |
tree | 1916da249f0bb5d25d77ad7bec7bb1a912816f53 /tests/refs | |
parent | 4e1b3b3b7186b017223b8302a51289ff92ccba25 (diff) | |
download | libgit2-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.c | 9 |
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; |