Commit Graph

73 Commits

Author SHA1 Message Date
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
Vicent Marti
d064c74794 Merge remote-tracking branch 'ben/unified-revparse' into development 2013-04-15 23:18:24 +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
Carlos Martín Nieto
a258d8e357 branch: rename 'tracking' to 'upstream'
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
2013-03-30 15:45:57 +01:00
Jameson Miller
926acbcf8e Clone should not delete directories it did not create 2013-03-01 14:56:09 -05:00
nulltoken
c1b5e8c42b branch: Make git_branch_remote_name() cope with orphaned heads 2013-02-22 17:04:23 +01:00
nulltoken
3ad052218c Fix MSVC compilation warnings
Fix #1308
2013-02-05 20:33:27 +01: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
nulltoken
bf031581d3 branch: Introduce git_branch_tracking_name() 2013-01-16 22:56:13 +01: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
Vicent Marti
156cfec096 Cleanup Clar to make it SIMPLER 2013-01-02 02:05:11 +01: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
Sascha Cunz
96a289f5f3 clone-empty-test: Don't use one pointer for two things
... so we can clean up correctly.
2012-12-19 05:24:23 +01:00
Sascha Cunz
22d23c61ed Cleanup the test correctly 2012-12-17 17:15:58 +01:00
Ben Straub
57f5d8dca5 Remove placeholder files during tests 2012-12-14 14:15:42 -08:00
Ben Straub
1164acde96 Rebase fixup 2012-12-14 14:00:35 -08:00
Ben Straub
850b1edfe8 Allow clone to handle empty repos 2012-12-14 13:58:44 -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
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
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -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
Vicent Martí
aa1c3b588e Merge pull request #1016 from arrbee/fix-checkout-dir-removal
Update checkout with new strategies & behavior
2012-11-13 14:13:47 -08:00
Ben Straub
2ff1a0d0f0 Helpers for local-filesystem remote URLs 2012-11-09 16:59:46 -08:00
Russell Belfer
757b406504 Fix warnings and valgrind issues
This fixes some various warnings that showed up in Travis and
a couple uses of uninitialized memory and one memory leak.
2012-11-09 14:01:44 -08:00
Russell Belfer
ad9a921b92 Rework checkout with new strategy options
This is a major reworking of checkout strategy options.  The
checkout code is now sensitive to the contents of the HEAD tree
and the new options allow you to update the working tree so that
it will match the index content only when it previously matched
the contents of the HEAD.  This allows you to, for example, to
distinguish between removing files that are in the HEAD but not
in the index, vs just removing all untracked files.

Because of various corner cases that arise, etc., this required
some additional capabilities in rmdir and other utility functions.

This includes the beginnings of an implementation of code to read
a partial tree into the index based on a pathspec, but that is
not enabled because of the possibility of creating conflicting
index entries.
2012-11-09 13:52:07 -08:00
Ben Straub
505da062b8 Implement local transport's fetch 2012-11-09 10:33:05 -08:00
Ben Straub
1fc375e6ef Fix Windows build
Pedantic ordering of GIT_UNUSED vs. variable declarations.
2012-10-25 09:02:55 -07: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
9c05c17b7a Checkout progress now reports completed/total steps 2012-10-19 20:05:18 -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
nulltoken
add5efe7e9 test: fix some memory leaks 2012-10-16 00:49:05 +02:00