Carlos Martín Nieto
061047ccb6
Rethrow pack entry offset error
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
2f512ff81e
Use strcpy+strcat as memcpy was overlapping
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
0437d991bf
Use common capabilities
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
48a65a071d
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>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
9cf0f287bb
Tell the user where the downloaded packfile is stored
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
e1d8803068
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>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
44daec4229
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>
2011-08-18 02:34:08 +02:00
Carlos Martín Nieto
da2902204b
Download pack
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
7e1a94db11
Move have sending
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
b4c9063040
Implement sending haves
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
0e20ba6066
Add a generic send_wants
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
65fbc48a17
negotiation
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
0132cf6438
git_pkt_send_wants
2011-08-18 02:34:07 +02:00
Carlos Martín Nieto
e1f4a76150
Add git_fetch_list_want which creates the "want" list
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-18 02:34:07 +02:00
schu
d4958b8848
refs.c: remove two lines of dead code
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 16:37:59 +02:00
schu
e7a3b3171b
reflog.c: fix memory leaks
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 16:37:53 +02:00
schu
31e5909214
git__strndup: immediately return NULL when ENOMEM
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 15:24:48 +02:00
schu
5a0659fe3b
config_file.c: fix memory leaks
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 14:36:53 +02:00
schu
b6817692a6
tsort.c: fix include of common.h
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 12:14:47 +02:00
schu
7fade6c63a
unix/posix.h: remove redundant include
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-17 12:14:12 +02:00
Carlos Martín Nieto
50a8fd0367
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>
2011-08-16 18:16:44 +02:00
schu
bcb080b00a
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>
2011-08-16 10:17:26 +02:00
schu
e7be57a98b
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>
2011-08-15 21:14:51 +02:00
Vicent Marti
5ae2f0c013
commit: Add support for Encoding header
2011-08-12 16:24:19 -07:00
Vicent Martí
2133c44f6a
Merge pull request #355 from jdavid/fix-build
...
Fix "redefinition of typedef git_indexer" build error
2011-08-09 17:08:18 -07:00
Vicent Martí
7bc3d0c86d
Merge pull request #361 from nulltoken/ntk/fix/wrap-strcmp
...
util: Add git__strcmp_cb() wrapper
2011-08-09 17:04:48 -07:00
nulltoken
d1f346931a
util: Add git__strcmp_cb() wrapper
...
We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
2011-08-09 22:34:54 +02:00
schu
33e9ee8f12
mwindow.c: fix -Wmissing-field-initializers
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-09 12:55:51 +02:00
Vicent Marti
f6867e639a
Fix compilation in Windows
2011-08-08 16:56:28 -07:00
Vicent Marti
09df3f2c0f
transport: Wrap strcmp
...
We don't want direct pointers to the CRT on Windows, we may
get stdcall conflicts.
2011-08-08 11:15:40 -07:00
Carlos Martín Nieto
8c1d5d4839
Use the internal sort in the local transport
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-06 16:33:24 +02:00
J. David Ibáñez
2d3e417e5f
Fix "redefinition of typedef git_indexer" build error
...
Signed-off-by: J. David Ibáñez <jdavid@itaapy.com>
2011-08-05 15:17:48 +02:00
Carlos Martín Nieto
97f40a0d5c
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>
2011-08-04 22:51:46 +02:00
Vicent Martí
31bf5f3857
Merge pull request #345 from carlosmn/gsoc2011/indexer
...
Implement a pack indexer
2011-08-03 18:59:30 -07:00
Vicent Martí
20c1bca123
Merge pull request #349 from MasterGrumpy/development
...
git_status_foreach issue
2011-08-03 18:56:25 -07:00
schu
63396a3998
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>
2011-08-03 16:05:32 +02:00
Carlos Martín Nieto
48b3ad4f15
Move pack index writing to a public function
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-03 14:02:49 +02:00
Carlos Martín Nieto
b7c44096ae
Implement the indexer
...
Only v2 index files are supported.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-03 14:02:41 +02:00
Luc Bertrand
8f643ce8e3
Remove duplicated sort
2011-08-03 13:44:28 +02:00
Luc Bertrand
9d9e492dc0
remove unused variable
2011-08-03 13:38:02 +02:00
Luc Bertrand
8cf077f4d5
fix recurse_tree_entries, continue parsing tree after first subdirectory found
2011-08-03 13:37:24 +02:00
schu
5274c31a89
signature.c: fix off-by-one error
...
Signed-off-by: schu <schu-github@schulog.org>
2011-08-03 01:17:31 +02:00
Carlos Martín Nieto
bcf21c556c
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>
2011-08-02 21:42:04 +02:00
Carlos Martín Nieto
b5b474dd0d
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>
2011-08-02 21:42:03 +02:00
Carlos Martín Nieto
a070f152bd
Move pack functions to their own file
2011-08-02 21:42:03 +02:00
Carlos Martín Nieto
7d0cdf82be
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>
2011-08-02 21:42:03 +02:00
Carlos Martín Nieto
ab525a7463
Rename stuff to git_indexer_
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-02 21:41:33 +02:00
Carlos Martín Nieto
f23c4a66bd
Start the runner
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-02 21:41:05 +02:00
Carlos Martín Nieto
3412391d4c
Intial indexer code
2011-08-02 21:41:02 +02:00
Carlos Martín Nieto
c7c9e18388
Move the pack structs to an internal header
2011-08-02 20:53:51 +02:00