summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJameson Miller <jamill@microsoft.com>2014-11-17 16:30:31 -0500
committerJameson Miller <jamill@microsoft.com>2014-11-17 16:30:31 -0500
commita03f6caf5c97a5ef8a9ec89c6f81662c12460bb1 (patch)
tree820c61b2f0cf241c7930f39246a991348ada55ba
parent5915d7001b0084356ece3f23c5e7c3f2be17e39c (diff)
downloadlibgit2-jamill/push_fetch_first.tar.gz
Update message for error during pushjamill/push_fetch_first
When attempting to update a reference on a remote during push, and the reference on the remote refers to a commit that does not exist locally, then we should report a more clear error message.
-rw-r--r--src/push.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/push.c b/src/push.c
index be5ec1c0e..8a50fb483 100644
--- a/src/push.c
+++ b/src/push.c
@@ -360,7 +360,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;
}