Vicent Martí
cd2ed9f0cc
Merge pull request #1518 from arrbee/export-oid-comparison
...
Remove most inlines from the public API
2013-04-30 04:02:52 -07:00
Carlos Martín Nieto
9c5d4b2e80
remote: fix a leak when dwim'ing refspecs
2013-04-30 12:05:16 +02: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
Russell Belfer
b7f167da29
Make git_oid_cmp public and add git_oid__cmp
2013-04-29 13:52:12 -07:00
Carlos Martín Nieto
d84884571d
remote: dwim the refspecs according to the remote's advertised refs
...
As git allows you to store shorthand refspecs in the configuration, we
need to do this ourselves.
2013-04-28 18:49:51 +02:00
Carlos Martín Nieto
1be680c4d0
refspec: unify the string and parsed data
...
It used to be separate as an attempt to make the querying easier, but
it didn't work out that way, so put all the data together.
Add git_refspec_string() as well to get the original string, which is
now stored alongside the independent parts.
2013-04-20 19:45:40 +02:00
Carlos Martín Nieto
bc6374eac4
remote: allow querying for refspecs
...
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.
Use this instead of the vector index hacks in the tests.
2013-04-20 19:45:40 +02: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
Carlos Martín Nieto
404eadb089
remote: don't try to update FETCH_HEAD if no extra heads exist
...
Don't try to update anything if there are no heads to update. This
saves us from trying to look into a fetch refspec when there is none.
A better fix for compatibility with git when using remotes without
refspecs is still needed, but this stops us from segfaulting.
2013-04-16 00:11:59 +02:00
Carlos Martín Nieto
67ba7d2031
Allow git_remote_ls after disconnecting from the remote
...
Keep the data around until free, as expected by our own fetch example
2013-04-15 23:22:32 +02: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
Arkadiy Shapkin
10c06114cb
Several warnings detected by static code analyzer fixed
...
Implicit type conversion argument of function to size_t type
Suspicious sequence of types castings: size_t -> int -> size_t
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'
Unsigned type is never < 0
2013-03-18 03:30:26 +04:00
Edward Thomson
d00d54645d
immutable references and a pluggable ref database
2013-03-07 11:01:52 -06:00
nulltoken
2bca5b679b
remote: Introduce git_remote_is_valid_name()
...
Fix libgit2/libgit2sharp#318
2013-02-11 23:19:41 +01:00
Philip Kelley
11d9f6b304
Vector improvements and their fallout
2013-01-27 14:17:07 -05:00
nulltoken
c5193e3c20
clone: Prevent segfault upon faulted remote creation
2013-01-25 12:26:09 +01:00
Ben Straub
3874f2d54f
Kill vestigal dangling-remote code
...
Fixes #1232
2013-01-11 20:23:46 -08:00
Edward Thomson
359fc2d241
update copyrights
2013-01-08 17:31:27 -06:00
Ben Straub
c07b52df1b
Remove inmem
flag, use NULL name instead
2013-01-02 12:48:17 -08:00
Ben Straub
0642c1431e
Move url
to last place in parameter list
2013-01-02 12:44:47 -08:00
Ben Straub
592f466c48
Fix GCC static/non-static compile error
2012-12-27 11:11:53 -08:00
nulltoken
f19304d265
remote: Prevent create() from blindly overwriting
2012-12-24 18:18:31 +01:00
nulltoken
7d4b65f608
Fix indentations
2012-12-24 16:54:27 +01:00
Ben Straub
79000951ec
In-memory remotes don't have names
2012-12-21 08:05:59 -08:00
Ben Straub
874dcb25eb
Remote: deprecate dangling, prevent saving in-memory
2012-12-20 12:01:13 -08:00
Ben Straub
29f27599ea
Rename remote creation APIs
...
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
2012-12-20 10:52:57 -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
Ben Straub
b914e17d82
API to set a dangling remote's repository
2012-12-12 12:23:24 -08:00
Ben Straub
a71c27ccda
Allow creation of dangling remotes
2012-12-12 12:15:25 -08:00
Ben Straub
59bccf33c4
Add a payload param to git_cred_acquire_cb
...
Fixes #1128 .
2012-12-10 11:11:01 -08:00
Vicent Martí
e05ca13f1f
Merge pull request #1115 from ben/struct-versions
...
Version info for public structs
2012-12-05 11:47:19 -08:00
nulltoken
032ba9e4ad
remote: deploy EINVALIDSPEC usage
2012-12-01 08:34:23 +01:00
Ben Straub
c7231c45fe
Deploy GITERR_CHECK_VERSION
2012-11-30 16:31:42 -08:00
Ben Straub
1071176900
Deploy versioned git_transport structure
2012-11-30 13:12:15 -08:00
Ben Straub
9267ff586f
Deploy GIT_REMOTE_CALLBACKS_INIT
2012-11-30 13:12:15 -08:00
Philip Kelley
613d5eb939
Push! By schu, phkelley, and congyiwu, et al
2012-11-28 11:42:37 -05:00
Ben Straub
f4a62c306d
Typedef enums.
2012-11-27 14:13:03 -08:00
Ben Straub
df705148ec
API updates for remote.h
...
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Ben Straub
54b2a37ac7
Clean up config.h
2012-11-27 13:18:28 -08:00
Ben Straub
2508cc66eb
Rename ref and reflog apis for consistency
2012-11-27 13:17:45 -08:00
Carlos Martín Nieto
0da81d2b39
config: return an emtpy string when there is no value
...
Returning NULL for the string when we haven't signaled an error
condition is counter-intuitive and causes unnecessary edge
cases. Return an empty string when asking for a string value for a
configuration variable such as '[section] var' to avoid these edge
cases.
If the distinction between no value and an empty value is needed, this
can be retrieved from the entry directly. As a side-effect, this
change stops the int parsing functions from segfaulting on such a
variable.
2012-11-13 14:49:16 -08:00
Carlos Martín Nieto
47db054df0
config: distinguish between a lone variable name and one without rhs
...
'[section] variable' and '[section] variable =' behave differently
when parsed as booleans, so we need to store that distinction
internally.
2012-11-13 13:53:41 -08:00
Edward Thomson
b0f6e45d14
create FETCH_HEAD specially instead of as a ref file
2012-11-11 11:56:33 -06:00
Philip Kelley
091361f569
Basic authentication for http and winhttp
2012-11-06 08:52:03 -05:00
Justin Spahr-Summers
c1cd036e40
'geterr' -> 'giterr'
2012-11-05 11:01:00 -08:00
Justin Spahr-Summers
f8baece754
Set GITERR_INVALID when encountering a NULL remote URL
2012-11-05 10:42:10 -08:00
Justin Spahr-Summers
83885891f5
Bail out if remote->url would be NULL
...
This fixes a crash from attempting to invoke git__strdup() against NULL.
2012-11-04 22:01:24 -08:00
Vicent Martí
7ae73e94db
Merge pull request #1030 from pwkelley/transports
...
Reorganize transport architecture
2012-11-01 09:15:29 -07:00
Philip Kelley
41fb1ca0ec
Reorganize transport architecture (squashed 3)
2012-11-01 09:02:33 -04:00