Commit Graph

24 Commits

Author SHA1 Message Date
nulltoken
add5efe7e9 test: fix some memory leaks 2012-10-16 00:49:05 +02:00
nulltoken
c4f68b3202 clone: fix detection of remote HEAD 2012-10-15 20:40:37 +02:00
nulltoken
4d968f134b clone: Explicit support of no-checkout option 2012-10-15 20:40:37 +02:00
Ben Straub
86a2da6e8a Clone: use libgit2's test repos 2012-10-15 10:48:17 -07:00
Ben Straub
65415ea275 Tests: add "network" category
Split the clone tests into network and no-network suites.
2012-10-15 10:48:17 -07:00
nulltoken
bf0e62a2b8 clone: fix cloning of empty repository 2012-10-08 00:44:21 +02:00
nulltoken
ebecf1e7d8 clone: reorganize tests 2012-10-08 00:44:19 +02:00
Ben Straub
5bb0dc9390 ODB: re-load packfiles on failed lookup
The old method was avoiding re-loading of packfiles by watching the mtime of the
pack directory. This causes the ODB to become stale if the directory and packfile
are written within the same clock millisecond, as when cloning a fairly small
repo.

This method tries to find the object in the cached packs, and forces a refresh when
that fails. This will cause extra stat'ing on a miss, but speeds up the success
case and avoids this race condition.
2012-09-19 04:41:24 -07:00
Ben Straub
15445f9ef7 Turn off network-dependent test for CI. 2012-07-27 11:14:30 -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
ef9905c990 checkout: introduce git_checkout_opts
Refactor checkout into several more-sensible
entry points, which consolidates common options
into a single structure that may be passed around.
2012-07-26 12:58:44 -07:00
Ben Straub
81167385e9 Fix compile and workings on msvc.
Signed-off-by: Ben Straub <bstraub@github.com>
2012-07-11 15:41:37 -07:00
Ben Straub
d024419f16 Add git_path_is_empty_dir. 2012-07-11 10:40:53 -07:00
Ben Straub
822d9dd51f Remove duplicate of git_repository_head_tree. 2012-07-11 09:50:12 -07:00
Ben Straub
1c7eb971ac Reindent. 2012-07-10 12:04:23 -07:00
Ben Straub
acdd3d959b Clone: allow empty dirs. 2012-06-21 19:51:56 -07:00
Ben Straub
5a20196f2d Fix warning on msvc build. 2012-06-21 15:11:13 -07:00
Ben Straub
941611153a Clone: minor cleanup and whitespace. 2012-06-21 10:34:11 -07:00
Ben Straub
8340dd5d5f Clone: remove fragile path-handling code.
Also standardized on 3-space indentation. Sorry
about that.
2012-06-21 09:53:45 -07:00
Ben Straub
da73fb70de Disable long-running test. 2012-06-21 09:53:45 -07:00
Ben Straub
3c4b008c4d Disable failing test (for now). 2012-06-21 09:53:45 -07:00
Ben Straub
f2a855d5fe Clone: restructure. 2012-06-21 09:53:44 -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