Edward Thomson
96b82b11c6
checkout: remove GIT_CHECKOUT_SAFE_CREATE
as a strategy
2015-02-27 13:50:44 -05:00
Carlos Martín Nieto
a295bd2dc4
doc: add documentation to all the public structs and enums
...
This makes them show up in the reference, even if the text itself isn't
the most descriptive.
These have been found with
grep -Przon '\n\ntypedef struct.*?\{' -- include
grep -Przon '\n\ntypedef enum.*?\{' -- include
2014-12-06 03:44:40 +01:00
Carlos Martín Nieto
6812afaf38
clone: remote git_clone_into{,_local} from the public API
...
As git_clone now has callbacks to configure the details of the
repository and remote, remove the lower-level functions from the public
API, as they lack some of the logic from git_clone proper.
2014-07-02 07:05:00 +02:00
Carlos Martín Nieto
d58a64e9a5
clone: add a callback for repository creation
...
Analogously to the remote creation callback, provide a way for the user
of git_clone() to create the repository with whichever options they
desire via callback.
2014-07-02 07:05:00 +02:00
Philip Kelley
1697cd6ff5
Improvements to git_transport extensibility
...
git_remote_set_transport now takes a transport factory rather than a transport
git_clone_options now allows the caller to specify a remote creation callback
2014-06-26 22:34:37 -04:00
Carlos Martín Nieto
76f76162b2
remote: update documentation
...
Add docs for git_clone_local_t and move the docs for the
git_clone_options to each field.
2014-06-11 21:20:23 +02:00
Carlos Martín Nieto
2614819cf3
clone: allow for linking in local clone
...
If requested, git_clone_local_into() will try to link the object files
instead of copying them.
This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
2014-05-28 15:40:47 +02:00
Carlos Martín Nieto
c1dbfcbb4a
clone: add flag not to link
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
121b26738e
clone: add flags to override whether to perform a local clone
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
4386d80be1
clone: perform a "local clone" when given a local path
...
When git is given such a path, it will perform a "local clone",
bypassing the git-aware protocol and simply copying over all objects
that exist in the source.
Copy this behaviour when given a local path.
2014-05-28 15:40:20 +02:00
Russell Belfer
702efc891f
Make init_options fns use unsigned ints and macro
...
Use an unsigned int for the version and add a helper macro so the
code is simplified (and so the error message is a common string).
2014-05-02 09:21:33 -07:00
Ben Straub
6affd71f33
git_checkout_opts -> git_checkout_options
2014-03-06 09:44:51 -08:00
Matthew Bowen
b9f819978c
Added function-based initializers for every options struct.
...
The basic structure of each function is courtesy of arrbee.
2014-03-05 21:49:23 -05:00
Ben Straub
1cc974ab62
Augment clone API with reflog parameters
2014-01-30 15:52:13 -08:00
Russell Belfer
8f1066a05f
Update clone doc and tests for callback return val
...
Clone callbacks can return non-zero values to cancel the clone.
This adds some tests to verify that this actually works and updates
the documentation to be clearer that this can happen and that the
return value will be propagated back by the clone function.
2013-12-11 10:57:51 -08:00
Carlos Martín Nieto
0e0cf78773
clone: put the callbacks struct directly in the clone options
...
There's no need for this to be a pointer to somewhere else.
2013-10-02 14:04:44 +02:00
Carlos Martín Nieto
36a241acbb
clone: mention clone_into in the clone documentation
...
Make the difference more explicit.
2013-10-02 06:42:27 +02:00
Carlos Martín Nieto
c833893c64
clone: re-allow using a custom remote name
...
This is a small thing that by itself doesn't quite justify making the
user use clone_into.
2013-10-02 06:42:26 +02:00
Carlos Martín Nieto
eec1c1fe1e
clone: const-ify checkout options
...
The removal of many options which lead to the direct usage of the
user's checkout options means we should make sure they remain const.
2013-10-02 06:42:26 +02:00
Carlos Martín Nieto
b9bf5d701d
clone: re-add a way to ignore certificate errors
...
This used to be done via transport flags, which was removed in a
previous commit.
2013-10-02 06:42:26 +02:00
Carlos Martín Nieto
6ac15eff6d
clone: remove more options from basic clone
...
The basic clone function is there to make it easy to create a "normal"
clone. Remove a bunch of options that are about changing the remote's
configuration.
2013-10-02 06:42:26 +02:00
Carlos Martín Nieto
c8dbec4803
clone: remove the autotag option
...
Downloading all tags is part of what makes it a clone instead of
simply a fetch.
2013-10-02 06:41:42 +02:00
Carlos Martín Nieto
d19870d947
clone: implement git_clone_into
...
This allows you to set up the repository and remote as you which to
have them before performing the clone operation.
2013-10-02 06:41:42 +02:00
Carlos Martín Nieto
e3c131c544
remote: move the credentials callback to the struct
...
Move this one as well, letting us have a single way of setting the
callbacks for the remote, and removing fields from the clone options.
2013-10-02 06:41:42 +02:00
Carlos Martín Nieto
d31402a3fc
remote: put the _download() callback with the others
...
The text progress and update_tips callbacks are already part of the
struct, which was meant to unify the callback setup, but the download
one was left out.
2013-10-02 06:41:42 +02:00
Linquize
f2df503bab
git_clone supports optional init_options
2013-09-16 08:02:36 +08:00
Nathan Daly
883929144d
Added support for setting transport flags (No check SSL cert) to git_clone call.
2013-05-31 08:53:22 -04:00
Carlos Martín Nieto
0b0ecbec2b
clone: fix param comment
2013-03-19 17:42:10 +01:00
Ben Straub
f393d4e8d7
Clone: fetch all tags
2013-02-06 13:07:56 -08:00
Sascha Cunz
f31cae8be9
Default git_clone_options' checkout strategy to GIT_CHECKOUT_SAFE_CREATE
2013-01-12 05:51:00 +01:00
Sascha Cunz
88aef76635
Implement analog for 'git checkout --branch xxx ...'
2013-01-11 03:10:19 +01:00
Edward Thomson
359fc2d241
update copyrights
2013-01-08 17:31:27 -06:00
Ben Straub
730df6d0f7
Include checkout options inline
2013-01-02 13:43:54 -08:00
Ben Straub
b412d56389
Add more clone options. Push test suite segfaults.
2012-12-19 17:02:06 -08:00
Ben Straub
b9e7e2b4e1
Move non-options back out of options struct
2012-12-14 13:46:45 -08:00
Ben Straub
18b2d560d3
Deploy git_clone_options; remove git_clone_bare
2012-12-14 13:03:59 -08:00
Ben Straub
7e61044019
Introduce git_clone_options
2012-12-14 12:30:57 -08:00
Ben Straub
44f36f6e3b
Convert clone to use dangling remotes
2012-12-12 19:48:44 -08:00
Vicent Marti
cfbe4be3fb
More external API cleanup
...
Conflicts:
src/branch.c
tests-clar/refs/branches/create.c
2012-11-27 13:18:27 -08:00
Ben Straub
7d222e1312
Network progress: rename things
...
git_indexer_stats and friends -> git_transfer_progress*
Also made git_transfer_progress members more sanely
named.
2012-10-24 13:29:14 -07:00
Ben Straub
c70ad945cd
Update doc strings, warn about callback perf
2012-10-23 09:23:44 -07:00
Ben Straub
aa1e86741d
Clone: in-line callbacks for progress
...
Also implemented in the git2 example.
2012-10-19 19:36:22 -07:00
Ben Straub
183d8bddeb
Remove checkout_stats from git_clone
2012-10-19 19:36:22 -07:00
Ben Straub
92f91b0e3b
Clone: fix indentation
2012-10-19 19:34:14 -07:00
nulltoken
4d968f134b
clone: Explicit support of no-checkout option
2012-10-15 20:40:37 +02:00
Ben Straub
8b67f72b9c
Add documentation for clone methods.
2012-07-31 21:25:48 -07:00
Ben Straub
5280f4e698
Add checkout.h to git2.h.
...
Also correcting some documentation strings.
2012-07-31 19:39:06 -07:00
Ben Straub
b401bace1b
Restructure for better checkout options
...
* Removed the #define for defaults
* Promoted progress structure to top-level API call
argument
2012-07-26 13:12:21 -07:00
Ben Straub
bb1f6087e4
Add progress reporting to clone.
2012-06-21 09:53:44 -07:00
Ben Straub
764df57e82
Add git_clone and git_clone_bare.
...
So far they only create a repo, setup the "origin"
remote, and fetch. The API probably needs work as
well; there's no way to get progress information
at this point.
Also uncovered a shortcoming; git_remote_download
doesn't fetch over local transport.
2012-06-21 09:53:44 -07:00