Commit 3094102f694cc7bdbe3572a35050fec3729b2870

Ben Straub 2014-02-05T14:05:18

Avoid crash when skipping remote test

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tests/online/push.c b/tests/online/push.c
index 9f85ab4..55b97b2 100644
--- a/tests/online/push.c
+++ b/tests/online/push.c
@@ -562,8 +562,10 @@ void test_online_push__multi(void)
 
 	cl_git_pass(git_reflog_read(&log, _repo, "refs/remotes/test/b1"));
 	entry = git_reflog_entry_byindex(log, 0);
-	cl_assert_equal_s("test push", git_reflog_entry_message(entry));
-	cl_assert_equal_s("foo@example.com", git_reflog_entry_committer(entry)->email);
+	if (entry) {
+		cl_assert_equal_s("test push", git_reflog_entry_message(entry));
+		cl_assert_equal_s("foo@example.com", git_reflog_entry_committer(entry)->email);
+	}
 
 	git_reflog_free(log);
 }