Carlos Martín Nieto
8861d32f01
ssl: use the callback instead of ifs to determine how to get data
...
Using the callbacks makes it clearer and reduces the amount of #ifdefs
and ifs and we need in the code.
2012-07-30 20:28:16 +02:00
Carlos Martín Nieto
ae789622e4
examples: fix warnings in network/
2012-07-30 20:28:16 +02:00
Carlos Martín Nieto
ad4b5beb50
transport: store the refs in a common area
...
Instad of each transport having its own function and logic to get to
its refs, store them directly in transport.
Leverage the new gitno_buffer to make the parsing and storing of the
refs use common code and get rid of the git_protocol struct.
2012-07-30 20:28:16 +02:00
Carlos Martín Nieto
b49c8f71ae
remote: use the same code to control git and http
...
This allows us to add capabilitites to both at the same time, keeps
them in sync and removes a lot of code.
gitno_buffer now uses a callback to fill its buffer, allowing us to
use the same interface for git and http (which uses callbacks).
2012-07-30 20:28:16 +02:00
Carlos Martín Nieto
114dc6e14c
network: implement multi_ack for the git transport
2012-07-30 20:28:16 +02:00
Carlos Martín Nieto
64d01de8a7
remote: start moving the protocol to a common area
...
For the transition, http is going to keep its own logic until the
git/common code catches up with the implied multi_ack that http
has. This also has the side-effect of making the code cleaner and more
correct regardingt he protocol.
2012-07-30 20:25:10 +02:00
Russell Belfer
50364dd892
Merge pull request #847 from schu/inline-oid-cmp
...
git_oid_cmp: inline memcmp by hand to optimize
2012-07-29 22:30:01 -07:00
Michael Schubert
f6b26e770f
git_oid_cmp: inline memcmp by hand to optimize
...
git.git uses an inlined hashcmp function instead of memcmp, since it
performes much better when comparing hashes (most hashes compared
diverge within the first byte).
Measurements and rationale for the curious reader:
http://thread.gmane.org/gmane.comp.version-control.git/172286
2012-07-29 20:50:58 +02:00
Michael Schubert
6810ba089a
Fix -Wuninitialized warning
2012-07-28 11:33:12 +02:00
Ben Straub
e0681f6d07
Checkout: disable file-mode test on win32.
2012-07-27 20:39:43 -07:00
Ben Straub
32beb2ecfe
Fix testrepo ref count to include new branch.
2012-07-27 20:36:12 -07:00
Ben Straub
b31667fb69
Checkout: add head- and ref-centric checkouts.
...
Renamed git_checkout_index to what it really was,
and removed duplicate code from clone.c. Added
git_checkout_ref, which updates HEAD and hands off
to git_checkout_head.
Added tests for the options the caller can pass to
git_checkout_*.
2012-07-27 20:31:05 -07:00
Ben Straub
4d83399d35
Adjust for msvc pedantry.
2012-07-27 11:55:58 -07:00
Ben Straub
b494cdbdb2
Checkout: handle deeply-nested submodules better.
...
Now creating intermediate directories where the
submodule is deep, like "src/deps/foosubmodule".
2012-07-27 11:50:32 -07:00
Ben Straub
8a155a044b
Fix mismatched git_branch_create args.
2012-07-27 11:49:34 -07:00
Ben Straub
7affe23db0
Use new git_remote_update_tips signature.
2012-07-27 11:23:44 -07:00
Ben Straub
a4827a5b5c
Merge remote-tracking branch 'upstream/development' into test-merge
2012-07-27 11:17:21 -07:00
Ben Straub
15445f9ef7
Turn off network-dependent test for CI.
2012-07-27 11:14:30 -07:00
Vicent Martí
31637cd56a
Merge pull request #839 from nulltoken/topic/odb-foreach-documentation
...
odb: add some documentation to the foreach() test
2012-07-27 11:09:04 -07:00
Vicent Martí
60d5cc5747
Merge pull request #834 from carlosmn/network-callbacks
...
Add a struct for network callbacks
2012-07-27 09:52:44 -07:00
Vicent Marti
f0244463ad
branch: Add repository
argument to create
...
Yes, we can get the repository from the owner of the object, but having
it marked explicitly makes the API more consistent.
2012-07-27 18:49:37 +02:00
Vicent Marti
b41a30bdbb
Merge remote-tracking branch 'nulltoken/topic/branch-rework' into development
2012-07-27 18:45:55 +02:00
Vicent Marti
b84f75c357
reflog: Rename entry_drop
to drop
2012-07-27 18:43:02 +02:00
Vicent Marti
43b67d496b
Merge remote-tracking branch 'nulltoken/topic/reflog-delete' into development
2012-07-27 18:39:40 +02:00
Ben Straub
6eb240b0b4
Checkout: use caller's flags for open()
2012-07-26 19:09:37 -07:00
Carlos Martín Nieto
c0c390255a
remote: fix C99-ism
2012-07-27 02:37:15 +02:00
Carlos Martín Nieto
581b6a8e90
Merge pull request #838 from scunz/remote_push_url
...
Add support for push-urls
2012-07-26 17:29:58 -07:00
Ben Straub
095ccc013f
Checkout: implementation of most options
2012-07-26 16:31:49 -07:00
Russell Belfer
2031760c62
Fix git_tree_walk to return user error
...
This makes sure that an error code returned by the callback function
of `git_tree_walk` will stop the iteration and get propagated back
to the caller verbatim.
Also, this adds a minor helper function `git_tree_entry_byoid` that
searches a `git_tree` for an entry with the given OID. This isn't
a fast function, but it's easier than writing the loop yourself as
an external user of the library.
2012-07-26 16:10:22 -07:00
Sascha Cunz
eff5b49927
Remotes: Use correct url in git_remote_connect
2012-07-27 00:08:56 +02:00
Sascha Cunz
413d556384
Remotes: Save a cleaned pushurl (by deleting it from the config)
2012-07-27 00:08:54 +02:00
Sascha Cunz
8689a69d09
Tests: Test remote's pushurl
2012-07-26 23:08:24 +02:00
Sascha Cunz
765015902a
Remotes: Setter for url+pushurl; Getter for pushurl
2012-07-26 23:08:22 +02:00
Sascha Cunz
3ed4b5012b
Remotes: Load/Save for fetch.foo.pushurl
2012-07-26 22:36:43 +02:00
Sascha Cunz
cb020f0d99
Remove unneccessary string transformation
2012-07-26 22:36:43 +02: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
Michael Schubert
0aeae70553
tests-clar/status: fix missing-prototype warning
2012-07-25 17:01:50 +02:00
nulltoken
1d733b573a
odb: add some documentation to the foreach() test
2012-07-25 11:23:27 +02:00
nulltoken
c3be5c5af0
reflog: keep the reflog name in sync with the reference name
2012-07-25 08:01:13 +02:00
nulltoken
40c75652d0
reflog: prevent git_reflog_append() from persisting the reflog back to disk
2012-07-25 07:53:32 +02:00
nulltoken
ae8331784e
reflog: prevent git_reflog_read() from chocking when no log exists yet
2012-07-25 07:53:31 +02:00
nulltoken
bd72425d16
reflog: introduce git_reflog_write()
2012-07-25 07:53:30 +02:00
nulltoken
d284b3de63
reflog: rename git_reflog_write() to git_reflog_append()
2012-07-25 07:53:30 +02:00
nulltoken
59341a5d59
reflog: introduce git_reflog_entry_drop()
2012-07-25 07:53:29 +02:00
nulltoken
7c458e3aee
reflog: add GIT_OID_HEX_ZERO constant
2012-07-25 07:53:27 +02:00
nulltoken
1cb157184b
tests: reorganize reflog tests
2012-07-25 07:53:27 +02:00
Russell Belfer
7779437fd5
Merge pull request #799 from yorah/fix/issue-787
...
Fix/issue 787
2012-07-24 11:21:32 -07:00
Carlos Martín Nieto
034ccc76a6
travis: be more idiomatic with the environment
...
Instead of putting the compilers in CC, use the travis configuration
to specify them.
Also ask it to send reports to the IRC channel.
2012-07-24 19:45:51 +02:00
nulltoken
b8457baae2
portability: Improve x86/amd64 compatibility
2012-07-24 16:10:12 +02:00