Vicent Marti
87d9869fc3
Tabify everything
...
There were quite a few places were spaces were being used instead of
tabs. Try to catch them all. This should hopefully not break anything.
Except for `git blame`. Oh well.
2011-09-19 03:34:49 +03:00
Vicent Marti
bb742ede3d
Cleanup legal data
...
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
2011-09-19 01:54:32 +03:00
schu
855f06606d
status.c: add missing check for error
...
dirent_cb() didn't check the return value of determine_status().
Signed-off-by: schu <schu-github@schulog.org>
2011-09-17 17:28:39 +02:00
nulltoken
afdf8dcb97
Add some forgotten asserts in the status tests
2011-09-17 16:28:18 +02:00
nulltoken
8320001db7
Fix a off-by-one error in the git_status_foreach tests
...
Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
2011-09-17 16:07:28 +02:00
schu
ef37489041
status.c: remove wrong address operator
...
Signed-off-by: schu <schu-github@schulog.org>
2011-09-17 12:14:13 +02:00
Vicent Marti
934fa904e9
Update Clay script
2011-09-16 19:49:18 +02:00
Vicent Marti
df297a1f65
Fix Clay compilation under Win32
2011-09-16 19:42:44 +02:00
Vicent Marti
48e97ed1f0
Rename Clay target in CMakeLists
...
This allows to build both test suites at the same time
2011-09-16 05:48:50 +02:00
Vicent Marti
fe4aa2066d
Regenerate test suite
2011-09-16 05:47:18 +02:00
Vicent Marti
a5f8c1bd9e
Add missing prototypes
2011-09-16 05:46:18 +02:00
Vicent Marti
bcba84600b
Revert changes to t18
...
...Ops, I broke the old test when porting it to Clay.
2011-09-16 05:44:21 +02:00
David Boyce
784b3b494f
Fixed typo in example Makefile code and slimmed it down more.
...
Reverted signature of git_signature_new.
Removed error check wrappers (voted down). Made Makefile
work out of the box on Linux and Solaris when standard
cmake build instructions for the library are followed.
2011-09-15 23:15:38 -04:00
Vicent Marti
11385c3c4b
Add sample "Status" clay tests
2011-09-16 05:13:44 +02:00
nulltoken
d8b903dab0
status: enhance determination of statuses for a whole directory
...
- Should increase performance through usage of a walker
- No callback invocation for unaltered entries
2011-09-15 01:14:36 +02:00
nulltoken
56453d3468
status: enhance determination of status for a single file
...
- fix retrieval of a file status when working against a newly initialized repository
- reduce memory pressure
- prevents a directory from being tested
2011-09-15 01:14:36 +02:00
nulltoken
3601c4bfce
repository: Add git_repository_head()
2011-09-15 01:13:50 +02:00
nulltoken
a9daa9bc16
Mark the resources in the test folder as binary to prevent unexpected line-feed conversion
2011-09-15 01:13:50 +02:00
Vicent Marti
f1558d9bca
Come out and Clay
2011-09-15 01:12:46 +02:00
Vicent Martí
edb644dd98
Merge pull request #401 from boyski/document-git-success
...
Document GIT_SUCCESS
2011-09-13 10:51:27 -07:00
David Boyce
d911172255
Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or an error code".
2011-09-13 12:30:25 -04:00
David Boyce
0251733e01
Changes to allow examples/*.c to compile and link. This required on
...
change to the signature of an API function (git_signature_new).
Also, the examples/general.c had a lot of unchecked return values
which were addresed with a couple of macros. The resulting example
still does not work correctly but at least now it fails with an
error message rather than not compiling or dumping core. Example
runtime issues may be addressed in a later commit.
2011-09-12 23:39:47 -04:00
David Boyce
9940a01c3f
Fixed to build examples with knowledge of include and lib locations.
2011-09-12 23:38:58 -04:00
Carlos Martín Nieto
2aae218881
Add checks for NULL to the config and remote free functions
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-13 02:05:12 +02:00
Sebastian Schuberth
79a343968a
Fix a bug and GCC warning introduced in 932669b
...
For unsigned types, the comparison >= 0 is always true, so avoid it by using
a post-decrement and integrating the initial assigment into the loop body.
No change in behavior is intended.
2011-09-12 22:22:59 +02:00
Carlos Martín Nieto
f9d4b0c395
git_repository_config: open global config file automatically
...
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-12 17:25:46 +02:00
Carlos Martín Nieto
7e08191a06
http: also store Content-Type if it's the last field
...
When Content-Type is the last field, we only know when we can store it
when we reach on_headers_complete.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-12 17:04:17 +02:00
Carlos Martín Nieto
5604f92880
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>
2011-09-12 17:04:17 +02:00
Carlos Martín Nieto
1b76290089
Implement ls-remote over smart HTTP
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-12 17:04:17 +02:00
Jerome Lambourg
22c3046462
Fix compilation issues with ming64 headers
2011-09-12 11:06:54 +02:00
Carlos Martín Nieto
4a619797ec
tree: use git_treebuilder to write the index as a tree
...
There is no point in reinventing the wheel when using the treebuilder
is much more straightforward and makes the code more readable. There
is no optimisation, and the performance is no worse than when writing
the tree object ourselves.
2011-09-10 02:05:38 +02:00
schu
c8f16bfef9
filebuf.c: fix unused-but-set warning
...
write_deflate() used to ignore errors by zlib's deflate function when
not compiling in DEBUG mode. Always read $result and throw an error
instead.
Signed-off-by: schu <schu-github@schulog.org>
2011-09-09 16:59:28 +02:00
Carlos Martín Nieto
928dd90ae8
netops: store the error if gitno_send fails
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:17:58 +02:00
Carlos Martín Nieto
b8a8191fed
http: add http-parser
...
The code is under the MIT lincense
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:12:12 +02:00
Carlos Martín Nieto
24384700d2
netops: don't try to free addrinfo on DNS error
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:12:11 +02:00
Carlos Martín Nieto
b76f752279
pkt: add the comment type
...
This is needed for smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:12:11 +02:00
Carlos Martín Nieto
c7c3051328
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>
2011-09-09 13:12:11 +02:00
Carlos Martín Nieto
b87600cb6b
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>
2011-09-09 13:12:11 +02:00
Carlos Martín Nieto
b0bda0a4ee
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>
2011-09-09 13:12:11 +02:00
Vicent Martí
3f3f6225f8
Merge pull request #391 from sschuberth/development
...
Warning fixes
2011-09-08 14:20:19 -07:00
Sebastian Schuberth
bac47f1ff8
Add myself to the list of Git authors who consent
2011-09-08 17:13:32 +02:00
Sebastian Schuberth
18136d8306
Fix an integral overflow on 64-bit
2011-09-08 17:09:10 +02:00
Sebastian Schuberth
1c3fac4d5e
Add casts to get rid of some warnings when filling zlib structures
2011-09-08 17:08:57 +02:00
Sebastian Schuberth
353560b440
Get rid of a superfluous pointer cast
2011-09-08 17:08:10 +02:00
Sebastian Schuberth
45e93ef34e
Fix minor indentation issues (spaces to tabs)
2011-09-08 17:07:52 +02:00
Sebastian Schuberth
26e74c6ace
Fix some random size_t vs. int conversion warnings
2011-09-08 17:07:37 +02:00
Carlos Martín Nieto
76a9081db2
pkt: don't use strlen before we know the name is NUL-terminated
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-07 16:37:19 +02:00
Carlos Martín Nieto
db84b7988b
Move extract_host_and_port to netops and add default port argument
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-04 16:07:52 +02:00
Carlos Martín Nieto
3d975abcb8
Add HTTP transport skeleton
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-04 16:04:14 +02:00
Vicent Martí
564f0f7be1
Merge pull request #388 from lambourg/master
...
pull request for #387
2011-09-02 06:08:47 -07:00