]>
git.proxmox.com Git - libgit2.git/log
Carlos Martín Nieto [Sun, 11 Sep 2011 12:42:31 +0000 (14:42 +0200)]
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>
Carlos Martín Nieto [Fri, 9 Sep 2011 11:18:52 +0000 (13:18 +0200)]
Implement ls-remote over smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 9 Sep 2011 11:17:58 +0000 (13:17 +0200)]
netops: store the error if gitno_send fails
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 4 Sep 2011 23:13:46 +0000 (01:13 +0200)]
http: add http-parser
The code is under the MIT lincense
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Tue, 6 Sep 2011 19:44:13 +0000 (21:44 +0200)]
netops: don't try to free addrinfo on DNS error
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 4 Sep 2011 19:28:11 +0000 (21:28 +0200)]
pkt: add the comment type
This is needed for smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Mon, 5 Sep 2011 19:38:56 +0000 (21:38 +0200)]
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>
Carlos Martín Nieto [Mon, 5 Sep 2011 00:33:02 +0000 (02:33 +0200)]
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>
Carlos Martín Nieto [Wed, 7 Sep 2011 17:13:40 +0000 (19:13 +0200)]
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>
Carlos Martín Nieto [Wed, 7 Sep 2011 14:35:11 +0000 (16:35 +0200)]
pkt: don't use strlen before we know the name is NUL-terminated
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 4 Sep 2011 13:32:11 +0000 (15:32 +0200)]
Move extract_host_and_port to netops and add default port argument
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 2 Sep 2011 12:20:43 +0000 (14:20 +0200)]
Add HTTP transport skeleton
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí [Fri, 2 Sep 2011 13:08:47 +0000 (06:08 -0700)]
Merge pull request #388 from lambourg/master
pull request for #387
Jerome Lambourg [Fri, 2 Sep 2011 11:00:27 +0000 (13:00 +0200)]
Fix for issue #387
Vicent Marti [Wed, 31 Aug 2011 01:45:34 +0000 (03:45 +0200)]
Fix compilation in MinGW
Vicent Marti [Tue, 30 Aug 2011 18:32:33 +0000 (11:32 -0700)]
posix: Fix undeclared prototype
Vicent Marti [Tue, 30 Aug 2011 18:27:36 +0000 (11:27 -0700)]
repository: Fix signed/unsigned comp.
Vicent Marti [Tue, 30 Aug 2011 17:48:13 +0000 (19:48 +0200)]
netops: This is the proper check
Vicent Martí [Tue, 30 Aug 2011 17:46:40 +0000 (10:46 -0700)]
Merge pull request #380 from kiryl/no-release-debug
CMakeLists: no need in split debug/release build
Vicent Marti [Tue, 30 Aug 2011 17:44:09 +0000 (19:44 +0200)]
netops: Use the size_t, Luke
Carlos Martín Nieto [Mon, 22 Aug 2011 13:43:57 +0000 (15:43 +0200)]
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>
Carlos Martín Nieto [Mon, 22 Aug 2011 13:18:19 +0000 (15:18 +0200)]
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>
Carlos Martín Nieto [Fri, 19 Aug 2011 07:03:19 +0000 (09:03 +0200)]
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>
Vicent Marti [Tue, 30 Aug 2011 11:34:14 +0000 (13:34 +0200)]
compat: Move `mkstemp` to the POSIX compat layer
Vicent Marti [Tue, 30 Aug 2011 11:10:26 +0000 (13:10 +0200)]
network: <select.h> is not available in MinGW
Vicent Martí [Tue, 30 Aug 2011 10:39:28 +0000 (03:39 -0700)]
Merge pull request #378 from kiryl/Wuninitialized
Wuninitialized
Vicent Martí [Fri, 26 Aug 2011 03:42:03 +0000 (20:42 -0700)]
Merge pull request #379 from kiryl/STRLEN
Drop STRLEN() macros
Kirill A. Shutemov [Thu, 25 Aug 2011 20:57:06 +0000 (23:57 +0300)]
pkt: use sizeof() instead of strlen() to avoid variable length array
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Thu, 25 Aug 2011 11:22:57 +0000 (14:22 +0300)]
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>
Kirill A. Shutemov [Thu, 25 Aug 2011 11:31:19 +0000 (14:31 +0300)]
CMakeLists: no need in split debug/release build
With GNU toolchain there's no need to split debug/release build.
It's useful to have -O2 in debug envitonment since GCC show more
warnings in this case. -O2 -g works fine.
For release purpose, debug information can be stripted on later stage.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Wed, 24 Aug 2011 17:11:15 +0000 (20:11 +0300)]
transport_git: add missed error handling
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Wed, 24 Aug 2011 17:10:50 +0000 (20:10 +0300)]
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>
Vicent Marti [Thu, 18 Aug 2011 00:28:34 +0000 (02:28 +0200)]
transport: Merge bitfield
I don't think MSVC merges these automatically.
Vicent Marti [Thu, 18 Aug 2011 00:13:51 +0000 (02:13 +0200)]
posix: Properly handle `snprintf` in all platforms
Vicent Marti [Tue, 16 Aug 2011 11:05:05 +0000 (13:05 +0200)]
odb: Do not pass around a header when hashing
Carlos Martín Nieto [Sat, 13 Aug 2011 18:18:29 +0000 (20:18 +0200)]
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>
Carlos Martín Nieto [Fri, 12 Aug 2011 20:44:35 +0000 (22:44 +0200)]
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>
Carlos Martín Nieto [Fri, 12 Aug 2011 17:02:36 +0000 (19:02 +0200)]
Implement and bind local_send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Wed, 10 Aug 2011 18:49:43 +0000 (20:49 +0200)]
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>
Carlos Martín Nieto [Wed, 10 Aug 2011 16:35:37 +0000 (18:35 +0200)]
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>
Carlos Martín Nieto [Wed, 10 Aug 2011 12:46:18 +0000 (14:46 +0200)]
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>
Carlos Martín Nieto [Sun, 7 Aug 2011 12:27:47 +0000 (14:27 +0200)]
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>
Carlos Martín Nieto [Sun, 7 Aug 2011 12:02:04 +0000 (14:02 +0200)]
Remove enum git_whn
Instead, use flags inside the git_remote_head structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 08:26:33 +0000 (10:26 +0200)]
Assert a filename in indexer creation
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 08:23:53 +0000 (10:23 +0200)]
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>
Carlos Martín Nieto [Sat, 6 Aug 2011 11:48:52 +0000 (13:48 +0200)]
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>
Carlos Martín Nieto [Fri, 5 Aug 2011 22:35:20 +0000 (00:35 +0200)]
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>
Carlos Martín Nieto [Fri, 5 Aug 2011 16:20:00 +0000 (18:20 +0200)]
Rethrow pack entry offset error
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 16:11:30 +0000 (18:11 +0200)]
Use strcpy+strcat as memcpy was overlapping
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 13:45:05 +0000 (15:45 +0200)]
Use common capabilities
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Thu, 4 Aug 2011 20:42:58 +0000 (22:42 +0200)]
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>
Carlos Martín Nieto [Thu, 4 Aug 2011 15:50:50 +0000 (17:50 +0200)]
Tell the user where the downloaded packfile is stored
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Thu, 4 Aug 2011 11:07:55 +0000 (13:07 +0200)]
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>
Carlos Martín Nieto [Wed, 3 Aug 2011 20:03:57 +0000 (22:03 +0200)]
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>
Carlos Martín Nieto [Sun, 31 Jul 2011 00:40:43 +0000 (02:40 +0200)]
Download pack
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 23:16:47 +0000 (01:16 +0200)]
Move have sending
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 20:29:00 +0000 (22:29 +0200)]
Implement sending haves
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 16:56:20 +0000 (18:56 +0200)]
Add a generic send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 24 Jun 2011 14:23:19 +0000 (16:23 +0200)]
negotiation
Carlos Martín Nieto [Fri, 24 Jun 2011 22:23:48 +0000 (00:23 +0200)]
git_pkt_send_wants
Carlos Martín Nieto [Wed, 22 Jun 2011 12:53:01 +0000 (14:53 +0200)]
Add git_fetch_list_want which creates the "want" list
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí [Thu, 18 Aug 2011 00:33:44 +0000 (17:33 -0700)]
Merge pull request #375 from schu/cleanup
cleanup: some nitpicking and missing free's.
schu [Wed, 17 Aug 2011 13:58:03 +0000 (15:58 +0200)]
refs.c: remove two lines of dead code
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 13:50:19 +0000 (15:50 +0200)]
reflog.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 13:20:43 +0000 (15:20 +0200)]
git__strndup: immediately return NULL when ENOMEM
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 12:05:41 +0000 (14:05 +0200)]
config_file.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 10:14:47 +0000 (12:14 +0200)]
tsort.c: fix include of common.h
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 10:14:12 +0000 (12:14 +0200)]
unix/posix.h: remove redundant include
Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí [Tue, 16 Aug 2011 17:13:45 +0000 (10:13 -0700)]
Merge pull request #373 from carlosmn/fancy-branchname
Fix the reference character check for Unicode
Carlos Martín Nieto [Tue, 16 Aug 2011 16:16:44 +0000 (18:16 +0200)]
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>
Vicent Martí [Tue, 16 Aug 2011 08:37:15 +0000 (01:37 -0700)]
Merge pull request #372 from schu/reflog-return-oid
reflog: assimilate API
schu [Tue, 16 Aug 2011 07:57:43 +0000 (09:57 +0200)]
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>
schu [Mon, 15 Aug 2011 16:56:27 +0000 (18:56 +0200)]
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>
Vicent Martí [Sat, 13 Aug 2011 16:58:11 +0000 (09:58 -0700)]
Merge pull request #366 from belkiss/development
Add missing GIT_BEGIN_DECL and GIT_END_DECL to indexer header
Lambert CLARA [Sat, 13 Aug 2011 08:56:33 +0000 (10:56 +0200)]
Add missing GIT_BEGIN_DECL and GIT_END_DECL to indexer header
Vicent Martí [Fri, 12 Aug 2011 23:32:34 +0000 (16:32 -0700)]
Merge pull request #365 from carlosmn/pkg-config
Really fix pkg-config
Vicent Marti [Fri, 12 Aug 2011 23:24:19 +0000 (16:24 -0700)]
commit: Add support for Encoding header
Carlos Martín Nieto [Fri, 12 Aug 2011 21:57:44 +0000 (23:57 +0200)]
Really fix pkg-config
Without the @ONLY option, CONFIGURE_FILE would replace the variables
that are meant to be used to pkg-config at configure time.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti [Wed, 10 Aug 2011 22:25:17 +0000 (15:25 -0700)]
Add common.h to types.h
Vicent Martí [Wed, 10 Aug 2011 19:55:39 +0000 (12:55 -0700)]
Merge pull request #363 from schu/test-discover0
t12-repo.c: fix failing test discover0
schu [Wed, 10 Aug 2011 19:19:21 +0000 (21:19 +0200)]
t12-repo.c: fix failing test discover0
discover0 tried to stat a non existing directory. Create it beforehand.
Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí [Wed, 10 Aug 2011 00:08:44 +0000 (17:08 -0700)]
Merge pull request #359 from nulltoken/ntk/fix/discover-tests
Slight enhancement to the Discover test
Vicent Martí [Wed, 10 Aug 2011 00:08:18 +0000 (17:08 -0700)]
Merge pull request #355 from jdavid/fix-build
Fix "redefinition of typedef git_indexer" build error
Vicent Martí [Wed, 10 Aug 2011 00:06:10 +0000 (17:06 -0700)]
Merge pull request #360 from belkiss/development
Fix installation of libgit2.pc file
Vicent Martí [Wed, 10 Aug 2011 00:04:48 +0000 (17:04 -0700)]
Merge pull request #361 from nulltoken/ntk/fix/wrap-strcmp
util: Add git__strcmp_cb() wrapper
Vicent Martí [Wed, 10 Aug 2011 00:03:57 +0000 (17:03 -0700)]
Merge pull request #362 from schu/fix-missing-initializer
mwindow.c: fix -Wmissing-field-initializers
nulltoken [Tue, 9 Aug 2011 10:07:47 +0000 (12:07 +0200)]
util: Add git__strcmp_cb() wrapper
We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
schu [Tue, 9 Aug 2011 10:55:51 +0000 (12:55 +0200)]
mwindow.c: fix -Wmissing-field-initializers
Signed-off-by: schu <schu-github@schulog.org>
Lambert CLARA [Tue, 9 Aug 2011 06:50:13 +0000 (08:50 +0200)]
Fix installation of libgit2.pc file
configure_file outputs by default to binary dir,
and install(files) search from source dir.
nulltoken [Fri, 22 Jul 2011 10:31:51 +0000 (12:31 +0200)]
discover: Make test run in temporary folder instead of altering the test resources folder
Vicent Marti [Mon, 8 Aug 2011 23:56:28 +0000 (16:56 -0700)]
Fix compilation in Windows
Vicent Marti [Mon, 8 Aug 2011 18:15:40 +0000 (11:15 -0700)]
transport: Wrap `strcmp`
We don't want direct pointers to the CRT on Windows, we may
get stdcall conflicts.
Vicent Martí [Mon, 8 Aug 2011 18:10:16 +0000 (11:10 -0700)]
Merge pull request #357 from carlosmn/calling-convention
Use __stdcall by default on Windows
Vicent Martí [Sun, 7 Aug 2011 20:58:59 +0000 (13:58 -0700)]
Merge pull request #358 from carlosmn/pkg-config
Create and install pkg-config file
Carlos Martín Nieto [Sun, 7 Aug 2011 16:44:08 +0000 (18:44 +0200)]
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>
Carlos Martín Nieto [Sat, 6 Aug 2011 11:58:16 +0000 (13:58 +0200)]
Use __stdcall by default on Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 6 Aug 2011 09:26:59 +0000 (11:26 +0200)]
Force the test's main function to use cdecl under Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 6 Aug 2011 09:23:04 +0000 (11:23 +0200)]
Use the internal sort in the local transport
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
J. David Ibáñez [Fri, 5 Aug 2011 13:11:25 +0000 (15:11 +0200)]
Fix "redefinition of typedef git_indexer" build error
Signed-off-by: J. David Ibáñez <jdavid@itaapy.com>
Vicent Martí [Thu, 4 Aug 2011 23:50:10 +0000 (16:50 -0700)]
Merge pull request #353 from belkiss/development
Fix wrong test in t04-commit