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
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
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
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
Carlos Martín Nieto
c0c390255a
remote: fix C99-ism
2012-07-27 02:37:15 +02: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
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
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
786a17cd28
branch: enforce git_branch_delete() parameter checking
2012-07-24 16:09:50 +02:00
nulltoken
ef4d795ec5
refs: drop git_reference_remote_tracking_from_branch()
2012-07-24 16:09:49 +02:00
nulltoken
fb910281d6
branch: introduce git_branch_tracking()
2012-07-24 16:09:48 +02:00
nulltoken
bf9e8cc86b
branch: make git_branch_move() reference based
2012-07-24 16:09:47 +02:00
nulltoken
88bcd5153f
branch: introduce git_reference_is_branch()
2012-07-24 16:09:45 +02:00
nulltoken
eed378b669
branch: introduce git_branch_lookup()
2012-07-24 16:09:44 +02:00
nulltoken
b308c11e4e
branch: change git_branch_create() to make it return a reference
2012-07-24 16:09:43 +02:00
nulltoken
326ca710a0
branch: remove useless header
2012-07-24 16:09:42 +02:00
yorah
a1773f9d89
Add flag to turn off pathspec testing for diff and status
2012-07-24 14:03:09 +02:00
yorah
ffbc689c87
Fix getting status of files containing brackets
2012-07-24 14:03:09 +02:00
yorah
02a0d651d7
Add git_buf_unescape and git__unescape to unescape all characters in a string (in-place)
2012-07-24 14:03:07 +02:00
Carlos Martín Nieto
944d250f96
update_tips: report error if it fails to create a ref
2012-07-24 10:34:28 +02:00
Carlos Martín Nieto
7e48635d16
revparse: initialize 'parsed' in case the user doesn't give a number with the @-notation
2012-07-23 21:56:06 +02:00
Carlos Martín Nieto
279b45b05b
revparse: don't allow an empty string
...
Asking the library for "" used to give HEAD, but that's trying to
impose a default at the wrong layer. Make it fail.
2012-07-23 21:32:45 +02:00
Carlos Martín Nieto
b3aaa7a7c8
Add a struct for network callbacks
...
Currently only update_tips is used, but it prepares the way for
progress output during download.
2012-07-21 18:44:01 +02:00
Vicent Martí
5b78696334
Merge pull request #818 from nulltoken/rework
...
Revparse rework
2012-07-21 07:56:59 -07:00
Carlos Martín Nieto
5d9cfa07ac
config: escape subsection names when creating them
...
This allows us to set options like "some.foo\\ish.var".
This closes #830
2012-07-21 02:28:46 +02:00
Vicent Martí
c8a1892e71
Merge pull request #831 from schu/tree-walk-order
...
tree: fix ordering for git_tree_walk
2012-07-20 06:56:09 -07:00
Russell Belfer
71d2735837
Fix bug with merging diffs with null options
...
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it. I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
2012-07-19 10:23:45 -07:00
Michael Schubert
c6f429535c
tree: fix ordering for git_tree_walk
...
Josh Triplett noticed libgit2 actually does preorder entries in
tree_walk_post instead of postorder. Also, we continued walking even
when an error occured in the callback.
Fix #773 ; also, allow both pre- and postorder walking.
2012-07-19 18:44:08 +02:00
nulltoken
e2c81fca8f
revparse: deploy git_object_peel()
2012-07-17 20:32:41 +02:00
nulltoken
db9be9457d
object: introduce git_object_peel()
...
Partially fix #530
2012-07-17 20:32:40 +02:00
nulltoken
b8748c1217
revparse: enhance parsing engine
2012-07-17 20:32:39 +02:00
Michael Schubert
6fc0bdc53e
Remove old error handling code
2012-07-17 10:52:16 +02:00
Vicent Marti
227f313119
attr: Rename the git_attr__
exports
...
Pevents collisions with the original libgit, which also exports those
exact symbols.
Fixes #822
2012-07-15 14:32:51 +02:00