| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This tells the remote to send us any tags that point to objects that
we are downloading.
|
|
|
|
|
| |
This lets us notify the user of what the remote end is doing while we
wait for it to start sending us the packfile.
|
|
|
|
|
|
|
|
| |
This allows us to add capabilitites to both at the same time, keeps
them in sync and removes a lot of code.
gitno_buffer now uses a callback to fill its buffer, allowing us to
use the same interface for git and http (which uses callbacks).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The correct way to advertise out capabilities is by appending them to
the first 'want' line, using SP as separator, instead of NUL as the
server does. Inconsistent documentation lead to the use of NUL in
libgit2.
Fix this so we can request much more efficient packs from the
remote which reduces the indexing time considerably.
|
|
|
|
|
|
|
|
| |
If it's not available, an error saying so will be returned when trying
to use a https:// URL.
This also unifies a lot of the network code to use git_transport in
many places instead of an socket descriptor.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Clear the error in pkt when we notice that the remote is starting to
send the packfile.
Fix the format string for Windows networking errors.
|
|\
| |
| | |
Recognize and report server-side error messages
|
| |
| |
| |
| |
| | |
When e.g. a repository isn't found, the server sends an error saying
so. Put that error message in our error buffer.
|
|/ |
|
|
|
|
|
|
| |
The recent 64-bit Windows fixes changed the return code in
git_pkt_parse_line() so it wouldn't signal a short buffer, breaking
the network code. Bring it back.
|
|
|
|
|
|
| |
Trying to send every single line immediately won't give us any speed
improvement and duplicates the code we need for other transports. Make
the git transport use the same buffer functions as HTTP.
|
|
|
|
|
| |
This fixes all the warnings on win64 except those in deps, which
come from the regex code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
did not fix the GIT_USUSED behavior on all platforms. This commit
walks through and really cleans things up more thoroughly, getting
rid of the unnecessary stuff.
To remove the use of some GIT_UNUSED, I ended up adding a couple
of new iterators for hashtables that allow you to iterator just
over keys or just over values.
In making this change, I found a bug in the clar tests (where we
were doing *count++ but meant to do (*count)++ to increment the
value). I fixed that but then found the test failing because it
was not really using an empty repo. So, I took some of the code
that I wrote for iterator testing and moved it to clar_helpers.c,
then made use of that to make it easier to open fixtures on a
per test basis even within a single test file.
|
|
|
|
| |
Signed-off-by: schu <schu-github@schulog.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This converts virtually all of the places that allocate GIT_PATH_MAX
buffers on the stack for manipulating paths to use git_buf objects
instead. The patch is pretty careful not to touch the public API
for libgit2, so there are a few places that still use GIT_PATH_MAX.
This extends and changes some details of the git_buf implementation
to add a couple of extra functions and to make error handling easier.
This includes serious alterations to all the path.c functions, and
several of the fileops.c ones, too. Also, there are a number of new
functions that parallel existing ones except that use a git_buf
instead of a stack-based buffer (such as git_config_find_global_r
that exists alongsize git_config_find_global).
This also modifies the win32 version of p_realpath to allocate whatever
buffer size is needed to accommodate the realpath instead of hardcoding
a GIT_PATH_MAX limit, but that change needs to be tested still.
|
|
|
|
|
|
| |
- Hide the remaining transports code
- Drop `git_headarray`, switch to using a callback to list refs. Makes
the code cleaner.
|
|
|
|
|
| |
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
|
|
|
|
| |
Put them all together so we know where to find them.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
| |
It was a bad idea.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
|
|
|
| |
As we don't know the length of the message we want to send to the
other end, we send a chunk size before each message. In later
versions, sending the wants might benefit from batching the lines
together.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
|
| |
A missing if caused the function to return after the first want line
without capabilities.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|\
| |
| | |
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
|
| |
| |
| |
| |
| |
| |
| |
| | |
wide values
Should fix issue #419.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
|
|\ \
| |/
|/| |
Implement ls-remote over HTTP
|
| |
| |
| |
| |
| |
| | |
This is needed for smart HTTP
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |
| |
| |
| | |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Instead, use flags inside the git_remote_head structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |
|
| |
|
|
|
|
|
| |
Some of the WIP API calls have been hidden in preparation for the next
minor release.
|
|
|
|
|
|
| |
This allows us to leave out the buffer handling logic.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
|
| |
This is where they really belong. Remvoe the prefix and make them
static.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
| |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|