Commit Graph

1491 Commits

Author SHA1 Message Date
Carlos Martín Nieto
2327a7cc10 Create and install pkg-config file
This hasn't been working since the switch away from waf.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-07 18:44:08 +02:00
Carlos Martín Nieto
1b5078f6b1 Use __stdcall by default on Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-06 18:18:12 +02:00
Carlos Martín Nieto
6e6ec54beb Force the test's main function to use cdecl under Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-06 16:33:24 +02: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
Vicent Martí
a655cc3571 Merge pull request #353 from belkiss/development
Fix wrong test in t04-commit
2011-08-04 16:50:10 -07:00
Vicent Martí
98bc99bea8 Merge pull request #352 from carlosmn/delta-base-error
Check for error calculating the delta base
2011-08-04 16:48:56 -07: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
Lambert CLARA
9d76b934f1 Fix wrong test in t04-commit
Replace all must_pass(strcmp()) by must_be_true(strcmp()==0)
2011-08-04 22:49:39 +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
Vicent Martí
42c5b64aa2 Merge pull request #348 from schu/sig-new
signature.c: fix off-by-one error
2011-08-03 18:54: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
65cb1586c4 Document the indexer calls
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-03 14:02:49 +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
Carlos Martín Nieto
7bfdb3d22b 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>
2011-08-02 20:53:51 +02:00
Vicent Martí
03d88ed415 Merge pull request #346 from belkiss/development
Fix memory leak when wrong object type is looked up from cache
2011-08-02 10:44:50 -07:00
Lambert CLARA
7d3ec3caac Fix memory leak when wrong object type is looked up from cache
Update unit test accordingly : no need to close
2011-08-02 19:23:00 +02:00
Vicent Martí
80de9ae03c Merge pull request #342 from schu/reflog-check-hash
reflog: avoid users writing a wrong ancestor OID
2011-08-01 08:19:12 -07:00
schu
eed2714ba5 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>
2011-08-01 17:02:42 +02:00
Vicent Martí
77bb37eb47 Merge pull request #344 from margro/development
Header fix for C++ and double include in git2.h
2011-07-29 10:38:12 -07:00
Marcel Groothuis
ede21113a2 Fix compilation in C++: remove double GIT_BEGIN_DECL 2011-07-29 19:31:39 +02:00
Marcel Groothuis
c7b508e63b Remove double include of remote.h from git2.h 2011-07-29 19:29:47 +02:00
Vicent Martí
cb1c75635e Merge pull request #335 from carlosmn/read-updated
Don't stat so much when reading references
2011-07-28 05:32:47 -07:00
Vicent Martí
3737537b0c Merge pull request #338 from carlosmn/del-test-index-read
Remove extra git_index_read from the tests
2011-07-28 05:23:46 -07:00
Vicent Martí
2b7fffa892 Merge pull request #341 from carlosmn/development
Fixup network headers
2011-07-28 05:23:27 -07:00
Vicent Martí
0b762f892e Merge pull request #343 from mike-perdide/include_status
Including git2/status.h in the git2.h header.
2011-07-28 05:20:37 -07:00
Julien Miotte
b311e3132a Including git2/status.h in the git2.h header. 2011-07-27 18:33:20 +02:00
Carlos Martín Nieto
1e76676fb4 Fixup network headers
The network headers were still missing some formalities.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-07-27 01:22:50 +02:00
Vicent Martí
4930e72187 Merge pull request #340 from Jopie64/development
On some header files, GIT_END_DECL was absent while GIT_BEGIN_DECL wasn't
2011-07-26 15:25:46 -07:00
Johan 't Hart
136e7129d7 On some header files, GIT_END_DECL was absent while GIT_BEGIN_DECL wasn't. 2011-07-27 00:06:19 +02:00
Carlos Martín Nieto
20a7e8208e Remove extra git_index_read from the tests
When you open an index with git_index_open, the file is read before
the function returns. Thus, calling git_index_read after that is
useless.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-26 15:53:52 +02:00
Kirill A. Shutemov
05a62d1a82 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>
2011-07-25 21:12:48 +02:00
Kirill A. Shutemov
76159921f4 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>
2011-07-25 21:12:47 +02:00
Kirill A. Shutemov
f939d39bec 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>
2011-07-25 21:12:47 +02:00
Kirill A. Shutemov
b2dd681512 index: introduce index_entry_free()
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-25 21:12:47 +02:00
Kirill A. Shutemov
51917d9ca2 index: extract index_entry_dup() from index_insert()
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-25 21:12:47 +02:00