Commit fc6ac074ee7ea945819e0a1d6f65ba160ba403d7

Vicent Marti 2014-11-20T13:13:46

Merge pull request #2713 from libgit2/jamill/push_fetch_first Update message for error during push

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/push.c b/src/push.c
index 88cd4cb..6671da4 100644
--- a/src/push.c
+++ b/src/push.c
@@ -333,7 +333,8 @@ static int revwalk(git_vector *commits, git_push *push)
 				continue;
 
 			if (!git_odb_exists(push->repo->_odb, &spec->roid)) {
-				giterr_set(GITERR_REFERENCE, "Cannot push missing reference");
+				giterr_set(GITERR_REFERENCE, 
+					"Cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.");
 				error = GIT_ENONFASTFORWARD;
 				goto on_error;
 			}