Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-09-05 00:07:42 +0400
committerBen Straub <bs@github.com>2013-09-05 00:07:42 +0400
commitf42d546c632d0458503efd01390bac76c185ebef (patch)
tree4ff941ba431a93233a843eebb770d4efc3e575cb /src/transports
parente98535923b7f5aeaaaca3fbfbdf69da8f109b495 (diff)
Provide better errors for push on non-bare local remotes
Diffstat (limited to 'src/transports')
-rw-r--r--src/transports/local.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transports/local.c b/src/transports/local.c
index 8a75de727..9ebea979c 100644
--- a/src/transports/local.c
+++ b/src/transports/local.c
@@ -361,7 +361,8 @@ static int local_push(
non-bare repo push support would require checking configs to see if
we should override the default 'don't let this happen' behavior */
if (!remote_repo->is_bare) {
- error = -1;
+ error = GIT_EBAREREPO;
+ giterr_set(GITERR_INVALID, "Local push doesn't (yet) support pushing to non-bare repos.");
goto on_error;
}