|
5604f928
|
2011-09-11T14:42:31
|
|
http: store which service to expect
Depending on what we want to do, we expect the Content-Type field to
have different contents. Store which service to expect instead of
hard-coding the string.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
1b762900
|
2011-09-09T13:18:52
|
|
Implement ls-remote over smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
928dd90a
|
2011-09-09T13:17:58
|
|
netops: store the error if gitno_send fails
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b87600cb
|
2011-09-05T02:33:02
|
|
buffer: add git_buf_clear
Set the size to zero so the memory that has already been allocated
can be reused
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b0bda0a4
|
2011-09-07T19:13:40
|
|
netops: get rid of the len - 1 limitation
This was as a result of the pkt code using string functions where
they shouldn't.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
24384700
|
2011-09-06T21:44:13
|
|
netops: don't try to free addrinfo on DNS error
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b76f7522
|
2011-09-04T21:28:11
|
|
pkt: add the comment type
This is needed for smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
c7c30513
|
2011-09-05T21:38:56
|
|
buffer: add git_buf_consume
Moves the content after 'end' to the beginning of the buffer
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
76a9081d
|
2011-09-07T16:35:11
|
|
pkt: don't use strlen before we know the name is NUL-terminated
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
db84b798
|
2011-09-04T15:32:11
|
|
Move extract_host_and_port to netops and add default port argument
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
3d975abc
|
2011-09-02T14:20:43
|
|
Add HTTP transport skeleton
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
564f0f7b
|
2011-09-02T06:08:47
|
|
Merge pull request #388 from lambourg/master
pull request for #387
|
|
13bc2016
|
2011-09-02T13:00:27
|
|
Fix for issue #387
|
|
c035ede2
|
2011-08-31T03:45:34
|
|
Fix compilation in MinGW
|
|
2fcf9c82
|
2011-08-30T11:32:33
|
|
posix: Fix undeclared prototype
|
|
6f1d23b2
|
2011-08-30T11:27:36
|
|
repository: Fix signed/unsigned comp.
|
|
92e34fa6
|
2011-08-30T19:48:13
|
|
netops: This is the proper check
|
|
0bd594b6
|
2011-08-30T19:44:09
|
|
netops: Use the size_t, Luke
|
|
778e1c73
|
2011-08-22T15:43:57
|
|
Add git_remote_new
As we no longer expose the transport functions, this is now the only
way to connect to a remote when given an URL instead of a remote name
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b5a8aa94
|
2011-08-22T15:18:19
|
|
Don't hide the transport details
Transports shouldn't get used outside of the library, so don't expose
accessor functions.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
74bd343a
|
2011-08-19T09:03:19
|
|
Fix Windows compilation
Sockets on Windows are unsigned, so define a type GIT_SOCKET which is
signed or unsigned depending on the platform.
Thanks to Em for his patience with this.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
f978b748
|
2011-08-30T13:34:14
|
|
compat: Move `mkstemp` to the POSIX compat layer
|
|
3ef7d063
|
2011-08-30T13:10:26
|
|
network: <select.h> is not available in MinGW
|
|
aa2f68d8
|
2011-08-30T03:39:28
|
|
Merge pull request #378 from kiryl/Wuninitialized
Wuninitialized
|
|
85b91652
|
2011-08-25T23:57:06
|
|
pkt: use sizeof() instead of strlen() to avoid variable length array
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
932669b8
|
2011-08-25T14:22:57
|
|
Drop STRLEN() macros
There is no need in STRLEN macros. Compilers can do this trivial
optimization on its own.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
c75a890b
|
2011-08-24T20:11:15
|
|
transport_git: add missed error handling
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
d7f0abab
|
2011-08-24T20:10:50
|
|
Fix false positive -Wuninitialized warnings
GCC produces several -Wuninitialized warnings. Most of them can be fixed
if we make visible for gcc that git__throw() and git__rethrow() always
return first argument.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
a7e34e3c
|
2011-08-18T02:28:34
|
|
transport: Merge bitfield
I don't think MSVC merges these automatically.
|
|
84dd3820
|
2011-08-18T02:13:51
|
|
posix: Properly handle `snprintf` in all platforms
|
|
c85e08b1
|
2011-08-16T13:05:05
|
|
odb: Do not pass around a header when hashing
|
|
7adba5f4
|
2011-08-13T20:18:29
|
|
Keep sending want lines if the server doesn't anwer a flush
Some servers take a long time to answer and expect us to keep sending
want lines; otherwise they close the connection. Avoid this by waiting
for one second for the server to answer. If the timeout runs out,
treat is as a NAK and keep sending want lines.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
427ca3d3
|
2011-08-12T22:44:35
|
|
Actually implement object negotiation
Only signal that we need a pack if we do need it and don't send a want
just because it's the first. If we don't need to download the pack,
then we can skip all of the negotiation and just return success.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
946dab73
|
2011-08-12T19:02:36
|
|
Implement and bind local_send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
22f65b9e
|
2011-08-10T20:49:43
|
|
Move negotiation to the transport
There are many ways how a transport might negotiate with the server,
so instead of making it fit into the smart protocol model, let the
transport do its thing. For now, the git protocol limits itself to
send only 160 "have" lines so we don't flood the server.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
79e9c3ec
|
2011-08-10T18:35:37
|
|
Update transport lifetime documentation
The original was written before any code was written and had nothing
to do with the way things are actually done.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
cdfd7bd0
|
2011-08-10T14:46:18
|
|
Use time sorting in fetch
This is what the docs say tha we should use.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
a1be77cd
|
2011-08-07T14:27:47
|
|
Be smarter about selecting wants
There is no need to inspect what the local repository is like. Only
check whether the objects exist locally.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
1564db11
|
2011-08-07T14:02:04
|
|
Remove enum git_whn
Instead, use flags inside the git_remote_head structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
ade3c9bb
|
2011-08-07T10:26:33
|
|
Assert a filename in indexer creation
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
7284c105
|
2011-08-07T10:23:53
|
|
Don't try to download the packfile too early
Make sure we only try to download the pack if we find the pack header
in the stream, and not if the server takes a bit longer to send us the
last NAK.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
441f57c2
|
2011-08-06T13:48:52
|
|
Add git_remote_update_tips
This function updates the references in the local reference storage to
match the ones in the remote.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
c1af5a39
|
2011-08-06T00:35:20
|
|
Implement cooperative caching
When indexing a file with ref deltas, a temporary cache for the
offsets has to be built, as we don't have an index file yet. If the
user takes the responsiblity for filling the cache, the packing code
will look there first when it finds a ref delta.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
061047cc
|
2011-08-05T18:20:00
|
|
Rethrow pack entry offset error
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
2f512ff8
|
2011-08-05T18:11:30
|
|
Use strcpy+strcat as memcpy was overlapping
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
0437d991
|
2011-08-05T15:45:05
|
|
Use common capabilities
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
48a65a07
|
2011-08-04T22:42:58
|
|
Only wait for pack if we need it
Provide the git_remote_download function to instruct the library to
downlad the packfile and let the user know the temporary location.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
9cf0f287
|
2011-08-04T17:50:50
|
|
Tell the user where the downloaded packfile is stored
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
e1d88030
|
2011-08-04T13:07:55
|
|
Don't expose the fetch code to the user
Move the generation of the want-list to be done from the negotiate
function, and keep the filtered references inside the remote
structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
44daec42
|
2011-08-03T22:03:57
|
|
Bind the configuration and remotes to a repository
Configurations when taken from a repository and remotes should be
identifiable as coming from a particular repository. This allows us to
reduce the amount of variables that the user has to keep track of.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
da290220
|
2011-07-31T02:40:43
|
|
Download pack
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
7e1a94db
|
2011-07-31T01:16:47
|
|
Move have sending
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b4c90630
|
2011-07-30T22:29:00
|
|
Implement sending haves
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
0e20ba60
|
2011-07-30T18:56:20
|
|
Add a generic send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
65fbc48a
|
2011-06-24T16:23:19
|
|
negotiation
|
|
0132cf64
|
2011-06-25T00:23:48
|
|
git_pkt_send_wants
|
|
e1f4a761
|
2011-06-22T14:53:01
|
|
Add git_fetch_list_want which creates the "want" list
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
d4958b88
|
2011-08-17T15:58:03
|
|
refs.c: remove two lines of dead code
Signed-off-by: schu <schu-github@schulog.org>
|
|
e7a3b317
|
2011-08-17T15:50:19
|
|
reflog.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
|
|
31e59092
|
2011-08-17T15:20:43
|
|
git__strndup: immediately return NULL when ENOMEM
Signed-off-by: schu <schu-github@schulog.org>
|
|
5a0659fe
|
2011-08-17T14:05:41
|
|
config_file.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
|
|
b6817692
|
2011-08-17T12:14:47
|
|
tsort.c: fix include of common.h
Signed-off-by: schu <schu-github@schulog.org>
|
|
7fade6c6
|
2011-08-17T12:14:12
|
|
unix/posix.h: remove redundant include
Signed-off-by: schu <schu-github@schulog.org>
|
|
50a8fd03
|
2011-08-16T18:16:44
|
|
Fix the reference character check for Unicode
We need to do an unsigned comparison, as otherwise UTF-8 characters
might look like they have the sign bit set and the check will fail.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
bcb080b0
|
2011-08-16T09:57:43
|
|
reflog: fix memory leaks
Make sure to free the existing reflog when we run out or memory while
adding new entries.
Signed-off-by: schu <schu-github@schulog.org>
|
|
e7be57a9
|
2011-08-15T18:56:27
|
|
reflog: assimilate reflog API to return git_oid's
Rather than returning the OIDs out of the reflog as string return them
as git_oid.
Signed-off-by: schu <schu-github@schulog.org>
|
|
5ae2f0c0
|
2011-08-12T16:24:19
|
|
commit: Add support for Encoding header
|
|
2133c44f
|
2011-08-09T17:08:18
|
|
Merge pull request #355 from jdavid/fix-build
Fix "redefinition of typedef git_indexer" build error
|
|
7bc3d0c8
|
2011-08-09T17:04:48
|
|
Merge pull request #361 from nulltoken/ntk/fix/wrap-strcmp
util: Add git__strcmp_cb() wrapper
|
|
d1f34693
|
2011-08-09T12:07:47
|
|
util: Add git__strcmp_cb() wrapper
We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
|
|
33e9ee8f
|
2011-08-09T12:55:51
|
|
mwindow.c: fix -Wmissing-field-initializers
Signed-off-by: schu <schu-github@schulog.org>
|
|
f6867e63
|
2011-08-08T16:56:28
|
|
Fix compilation in Windows
|
|
09df3f2c
|
2011-08-08T11:15:40
|
|
transport: Wrap `strcmp`
We don't want direct pointers to the CRT on Windows, we may
get stdcall conflicts.
|
|
8c1d5d48
|
2011-08-06T11:23:04
|
|
Use the internal sort in the local transport
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
2d3e417e
|
2011-08-05T15:11:25
|
|
Fix "redefinition of typedef git_indexer" build error
Signed-off-by: J. David Ibáñez <jdavid@itaapy.com>
|
|
97f40a0d
|
2011-08-04T22:51:46
|
|
Check for error calculating the delta base
Don't assume that it's always going to work.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
31bf5f38
|
2011-08-03T18:59:30
|
|
Merge pull request #345 from carlosmn/gsoc2011/indexer
Implement a pack indexer
|
|
20c1bca1
|
2011-08-03T18:56:25
|
|
Merge pull request #349 from MasterGrumpy/development
git_status_foreach issue
|
|
63396a39
|
2011-08-03T15:57:33
|
|
signature: adjust API to return error codes
git_signature_new() and git_signature_now() currently don't return error
codes. Change the API to return error codes and not pointers to let the
user handle errors properly.
Signed-off-by: schu <schu-github@schulog.org>
|
|
48b3ad4f
|
2011-08-01T14:02:09
|
|
Move pack index writing to a public function
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b7c44096
|
2011-07-28T23:35:39
|
|
Implement the indexer
Only v2 index files are supported.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
8f643ce8
|
2011-08-03T13:44:28
|
|
Remove duplicated sort
|
|
9d9e492d
|
2011-08-03T13:38:02
|
|
remove unused variable
|
|
8cf077f4
|
2011-08-03T13:37:24
|
|
fix recurse_tree_entries, continue parsing tree after first subdirectory found
|
|
5274c31a
|
2011-08-03T01:17:31
|
|
signature.c: fix off-by-one error
Signed-off-by: schu <schu-github@schulog.org>
|
|
bcf21c55
|
2011-07-28T23:59:53
|
|
Add git_vector_foreach
You can use it just as you'd use a for-loop
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
b5b474dd
|
2011-07-28T11:45:46
|
|
Modify the given offset in git_packfile_unpack
The callers immediately throw away the offset, so we don't need any
logical changes in any of them. This will be useful for the indexer,
as it does need to know where the compressed data ends.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
a070f152
|
2011-07-29T01:08:02
|
|
Move pack functions to their own file
|
|
7d0cdf82
|
2011-07-09T02:25:01
|
|
Make packfile_unpack_header more generic
On the way, store the fd and the size in the mwindow file.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
ab525a74
|
2011-07-07T19:20:13
|
|
Rename stuff to git_indexer_
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
f23c4a66
|
2011-07-07T19:08:45
|
|
Start the runner
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
3412391d
|
2011-07-07T11:47:31
|
|
Intial indexer code
|
|
c7c9e183
|
2011-07-07T10:17:40
|
|
Move the pack structs to an internal header
|
|
7bfdb3d2
|
2011-06-28T20:39:30
|
|
Factor out the mmap window code
This code is useful for more things than just the packfile handling
code. Factor it out so it can be reused.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
7d3ec3ca
|
2011-08-02T19:23:00
|
|
Fix memory leak when wrong object type is looked up from cache
Update unit test accordingly : no need to close
|
|
eed2714b
|
2011-08-01T17:00:31
|
|
reflog: avoid users writing a wrong ancestor OID
Disallow NULL as ancestor OID when writing a reflog entry for an
existing reference.
Signed-off-by: schu <schu-github@schulog.org>
|
|
cb1c7563
|
2011-07-28T05:32:47
|
|
Merge pull request #335 from carlosmn/read-updated
Don't stat so much when reading references
|
|
05a62d1a
|
2011-07-18T05:11:18
|
|
filebuf: update git_filebuf.write signature to take non-const buffer
z_stream.next_in is non-const. Although currently Zlib doesn't modify
buffer content on deflate(), it might be change in the future. gzwrite()
already modify it.
To avoid this let's change signature of git_filebuf.write and rework
git_filebuf_write() accordingly.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
76159921
|
2011-07-18T04:27:56
|
|
index: rework index entry initialization routine
index_init_entry() renamed to index_entry_init(). Now it allocates entry
on its own.
git_index_add() and git_index_append() reworked accordingly.
This commit fixes warning:
/home/kas/git/public/libgit2/src/index.c: In function ‘index_init_entry’:
/home/kas/git/public/libgit2/src/index.c:452:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
f939d39b
|
2011-07-18T04:16:42
|
|
index: rework index_insert()
Now index_insert() takes copy of index entry, not coping it by itself.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|