summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-07-16 13:03:07 -0700
committerVicent Marti <tanoku@gmail.com>2014-07-16 13:03:07 -0700
commit84a85d1bec3ce96bbb73b7a899ae6a1cc03ad673 (patch)
tree438254d6e6dea726f73ff0b51d70e3bb7d9d636a /src/clone.c
parented99e0b54fef9abb5b7de6ebb43168e57c5d2d04 (diff)
downloadlibgit2-84a85d1bec3ce96bbb73b7a899ae6a1cc03ad673.tar.gz
clone: should_clone? Of course we should clone. That's not the question
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/clone.c b/src/clone.c
index c7a708da7..523b1fe76 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -380,7 +380,7 @@ int git_clone__should_clone_local(const char *url_or_path, git_clone_local_t loc
if (local == GIT_CLONE_NO_LOCAL)
return 0;
- if (is_url = git_path_is_local_file_url(url_or_path)) {
+ if ((is_url = git_path_is_local_file_url(url_or_path)) != 0) {
if (git_path_fromurl(&fromurl, url_or_path) < 0) {
is_local = -1;
goto done;
@@ -437,14 +437,14 @@ int git_clone(
return error;
if (!(error = create_and_configure_origin(&origin, repo, url, &options))) {
- int should_clone = git_clone__should_clone_local(url, options.local);
+ int clone_local = git_clone__should_clone_local(url, options.local);
int link = options.local != GIT_CLONE_LOCAL_NO_LINKS;
- if (should_clone == 1)
+ if (clone_local == 1)
error = clone_local_into(
repo, origin, &options.checkout_opts,
options.checkout_branch, link, options.signature);
- else if (should_clone == 0)
+ else if (clone_local == 0)
error = clone_into(
repo, origin, &options.checkout_opts,
options.checkout_branch, options.signature);