Commit Graph

38 Commits

Author SHA1 Message Date
Russell Belfer
114f5a6c41 Reorganize diff and add basic diff driver
This is a significant reorganization of the diff code to break it
into a set of more clearly distinct files and to document the new
organization.  Hopefully this will make the diff code easier to
understand and to extend.

This adds a new `git_diff_driver` object that looks of diff driver
information from the attributes and the config so that things like
function content in diff headers can be provided.  The full driver
spec is not implemented in the commit - this is focused on the
reorganization of the code and putting the driver hooks in place.

This also removes a few #includes from src/repository.h that were
overbroad, but as a result required extra #includes in a variety
of places since including src/repository.h no longer results in
pulling in the whole world.
2013-06-10 10:10:39 -07:00
nulltoken
249888948f Fix some memory leaks 2013-05-10 19:22:47 +02:00
Jameson Miller
6f748f3885 Do not write tagopt configuration option on clone by default 2013-05-04 12:14:40 -04:00
Carlos Martín Nieto
1ffd0806f4 remote: add resfpec list accessors
Bring back a way of acessing the git_refspec* from a remote.

Closes #1514
2013-04-30 12:04:59 +02:00
Ben Straub
bd0a07f4bb Clone: replace fetch spec with custom value 2013-04-23 12:28:59 -07:00
Nikolai Vladimirov
dfdf709e3f get last refspec in clone test 2013-04-23 22:04:37 +03:00
Carlos Martín Nieto
4330ab26b5 remote: handle multiple refspecs
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.

Let the remotes and internal code know about multiple remotes and get
the tests passing with them.

Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
2013-04-20 17:54:13 +02:00
Ben Straub
2ebc3c66c2 Redeploy git_revparse_single. 2013-04-15 11:57:24 -07:00
Ben Straub
1aa21fe3b8 Deprecate git_revparse_single and _rangelike 2013-04-09 05:07:04 +04:00
Jameson Miller
926acbcf8e Clone should not delete directories it did not create 2013-03-01 14:56:09 -05:00
Frank Li
aa928de02a Add test case for clone head detached repo
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
2013-02-01 22:40:23 +08:00
Vicent Martí
e2d2c6e57d Merge pull request #1222 from scunz/clone_branch
Switch to specified branch during clone
2013-01-12 02:14:14 -08:00
Sascha Cunz
f1d4a35e94 Tests: Add test for check out of given branch during clone 2013-01-12 00:08:48 +01:00
Sascha Cunz
b5b2812097 Test: Cleanup some cleaning code 2013-01-12 00:07:44 +01:00
nulltoken
090d5e1fda Fix MSVC compilation warnings 2013-01-11 19:30:59 +01:00
nulltoken
b97fabfad5 tests: Fix some memory leaks 2013-01-06 16:22:24 +01:00
Vicent Marti
7761ce2162 Merge branch 'development' into clar2
Conflicts:
	tests-clar/clone/nonetwork.c
	tests-clar/online/clone.c
	tests-clar/online/fetchhead.c
2013-01-03 04:24:12 +01:00
Vicent Marti
f46769e52a Fix network suite 2013-01-03 02:13:37 +01:00
Ben Straub
922dd9788c Move some clone tests to the nonetwork suite 2013-01-02 13:54:37 -08:00
Ben Straub
730df6d0f7 Include checkout options inline 2013-01-02 13:43:54 -08:00
nulltoken
6bd09ecc14 Fix MSSVC compilation issue 2012-12-24 16:54:26 +01:00
Ben Straub
621b50e4d5 Clone: trust but verify 2012-12-19 17:02:06 -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
Vicent Marti
509216a5b2 test: Fix clone tests 2012-12-14 02:49:01 +01:00
Vicent Marti
b0b9fd3245 Merge remote-tracking branch 'origin/clone-auth' into development 2012-12-14 02:41:53 +01:00
Jameson Miller
8a8820d89f Add test to clone with absolute path 2012-12-13 17:58:12 -05:00
Ben Straub
24393ea6d3 Stop premature remote freeing when cloning 2012-12-13 09:14:56 -08:00
Ben Straub
7c353afd0e Define constant for default fetch spec 2012-12-13 08:47:29 -08:00
Ben Straub
44f36f6e3b Convert clone to use dangling remotes 2012-12-12 19:48:44 -08:00
Sascha Cunz
9094d30b93 Reset all static variables to NULL in clar's __cleanup
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.

This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.

Fixes #1096
2012-11-23 11:41:56 +01:00
Ben Straub
2ff1a0d0f0 Helpers for local-filesystem remote URLs 2012-11-09 16:59:46 -08:00
Ben Straub
505da062b8 Implement local transport's fetch 2012-11-09 10:33:05 -08: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
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