summaryrefslogtreecommitdiff
path: root/tests/clone/nonetwork.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-09-14 13:58:38 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-09-14 13:58:38 -0400
commit4cc355c97bd3a8c490759c489cfdcc9ab37e7f39 (patch)
treeea260f6be39d54ccffd14f65d8586293444a5cf8 /tests/clone/nonetwork.c
parentb0885675f7fc5fbca1df0c31a6b7914824a521b4 (diff)
downloadlibgit2-4cc355c97bd3a8c490759c489cfdcc9ab37e7f39.tar.gz
clone::nonetwork: don't use fixed size buffer
Diffstat (limited to 'tests/clone/nonetwork.c')
-rw-r--r--tests/clone/nonetwork.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/clone/nonetwork.c b/tests/clone/nonetwork.c
index 44a503818..7ebf19f46 100644
--- a/tests/clone/nonetwork.c
+++ b/tests/clone/nonetwork.c
@@ -297,16 +297,19 @@ static void assert_correct_reflog(const char *name)
{
git_reflog *log;
const git_reflog_entry *entry;
- char expected_log_message[128] = {0};
+ git_buf expected_message = GIT_BUF_INIT;
- sprintf(expected_log_message, "clone: from %s", cl_git_fixture_url("testrepo.git"));
+ git_buf_printf(&expected_message,
+ "clone: from %s", cl_git_fixture_url("testrepo.git"));
cl_git_pass(git_reflog_read(&log, g_repo, name));
cl_assert_equal_i(1, git_reflog_entrycount(log));
entry = git_reflog_entry_byindex(log, 0);
- cl_assert_equal_s(expected_log_message, git_reflog_entry_message(entry));
+ cl_assert_equal_s(expected_message.ptr, git_reflog_entry_message(entry));
git_reflog_free(log);
+
+ git_buf_free(&expected_message);
}
void test_clone_nonetwork__clone_updates_reflog_properly(void)