Commit Graph

6331 Commits

Author SHA1 Message Date
Ben Straub
784b3abbd5 rev-list.c example: use common utils, reorganize 2013-10-30 12:34:03 -07:00
Vicent Martí
cc7453417f Merge pull request #1919 from libgit2/cmn/multi-ack-detailed
protocol: basic support for multi_ack_detailed
2013-10-30 09:27:36 -07:00
Carlos Martín Nieto
1d37da3392 merge: any non-zero return from the user is an error
This fixes #1703.
2013-10-30 16:25:49 +01:00
Carlos Martín Nieto
2f8c481cc0 protocol: basic support for multi_ack_detailed
This tells the server that we speak it, but we don't make use of its
extra information to determine if there's a better place to stop
negotiating.

In a somewhat-related change, reorder the capabilities so we ask for
them in the same order as git does.

Also take this opportunity to factor out a fairly-indented portion of
the negotiation logic.
2013-10-30 16:20:42 +01:00
Ben Straub
9d83d368fc cat-file.c example: deploy helpers, reorg 2013-10-30 07:21:36 -07:00
Ben Straub
dbfd283327 add.c: proper frontmatter 2013-10-30 07:21:12 -07:00
Carlos Martín Nieto
97d32abb49 Remove leftover function declaration 2013-10-30 15:15:54 +01:00
Carlos Martín Nieto
a6154f2183 indexer: remove the stream infix
It was there to keep it apart from the one which read in from a file on
disk. This other indexer does not exist anymore, so there is no need for
anything other than git_indexer to refer to it.

While here, rename _add() function to _append() and _finalize() to
_commit(). The former change is cosmetic, while the latter avoids
talking about "finalizing", which OO languages use to mean something
completely different.
2013-10-30 15:00:05 +01:00
Ben Straub
7cc3c9bf00 init.c example: deploy more helpers 2013-10-30 06:09:08 -07:00
Ben Straub
e568bedf52 add.c example: deploy helpers, reorg 2013-10-30 06:08:54 -07:00
Vicent Marti
04e0c2b24d pack-objects: Depth can be negative 2013-10-30 14:00:44 +01:00
Ben Straub
a8422f9202 init example: deploy helpers, reorg 2013-10-30 05:38:12 -07:00
Russell Belfer
66902d4773 Extract common example helpers and reorg examples
This reorganizes a few of the examples so that the main function
comes first with the argument parsing extracted into a helper
that can come at the end of the file (so the example focuses more
on the use of libgit2 instead of command line support).  This also
creates a shared examples/common.[ch] so that useful helper funcs
can be shared across examples instead of repeated.
2013-10-29 18:30:49 -07:00
Ben Straub
7dcb1c4525 Adjust for diff API changes 2013-10-28 11:21:23 -07:00
Ben Straub
42c8f8f807 Merge remote-tracking branch 'libgit2/development' into blame 2013-10-28 11:04:58 -07:00
Vicent Martí
5c50f22a93 Merge pull request #1891 from libgit2/cmn/fix-thin-packs
Add support for thin packs
2013-10-28 09:25:44 -07:00
Vicent Martí
064e6e8121 Merge pull request #1912 from ethomson/push_err_messages
Test for failure, but don't test the error message
2013-10-28 07:05:13 -07:00
Vicent Martí
5565f3cda8 Merge pull request #1904 from libgit2/cmn/ssh-naming
Rename the ssh credentials
2013-10-28 07:04:58 -07:00
Ben Straub
8f4a8b096b Merge pull request #1802 from libgit2/cmn/reflog-backend
Make reflog part of refdb
2013-10-28 06:20:28 -07:00
Ben Straub
a7d28f40a2 ❤️ bool 2013-10-28 05:22:37 -07:00
Ben Straub
7f6db0ad12 Mmmm, GIT_FLEX_ARRAY 2013-10-28 05:19:30 -07:00
Ben Straub
ba02079f2d Avoid temporary object in lookup routine 2013-10-28 05:01:33 -07:00
Vicent Martí
a1efa5960d Merge pull request #1915 from zcbenz/common-h-before-config-h
The "common.h" should be included before "config.h".
2013-10-28 04:38:08 -07:00
Cheng Zhao
157cef1048 The "common.h" should be included before "config.h".
When building libgit2 for ia32 architecture on a x64 machine, including
"config.h" without a "common.h" would result the following error:
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2288): error C2373: 'InterlockedIncrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2295): error C2373: 'InterlockedDecrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2303): error C2373: 'InterlockedExchange' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2314): error C2373: 'InterlockedExchangeAdd' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
2013-10-28 12:57:15 +08:00
Vicent Martí
d4831b71ec Merge pull request #1913 from nvloff/remove_fedora_spec
remove rpm spec file and readme
2013-10-26 04:34:23 -07:00
Nikolai Vladimirov
dbc45b88cc remove rpm spec
Fedora provides a rpm package for libgit2 -
https://apps.fedoraproject.org/packages/libgit2.
2013-10-26 09:13:29 +03:00
Edward Thomson
9d41984cd3 Test for failure, but don't test the error message 2013-10-25 14:17:23 -04:00
Vicent Martí
8607286bc7 Merge pull request #1910 from ethomson/disable_winhttp
Allow -DWINHTTP=OFF to disable WinHTTP
2013-10-25 10:38:30 -07:00
Vicent Martí
8f2fe55ecf Merge pull request #1911 from ethomson/http_headers
Use two calls to set two headers
2013-10-25 10:37:37 -07:00
Edward Thomson
df9fc82e97 Use two calls to set two headers 2013-10-25 13:33:42 -04:00
Edward Thomson
1bfe7133e0 Allow -DWINHTTP=OFF to disable WinHTTP 2013-10-25 13:23:46 -04:00
Vicent Martí
fd5d80d25a Merge pull request #1907 from nikai3d/patch-1
fix typos in README.md
2013-10-24 07:45:54 -07:00
Nicolas Kaiser
63d1fad470 fix typos in README.md 2013-10-24 15:30:31 +02:00
Carlos Martín Nieto
474c8cf832 Really fix the pc file
It turns out that variables have function scope by default. Let's
really set -liconv and add a few libraries that were forgotten in
the previous commit.

We also need to special-case OSX, as they ship zlib but do not provide
a pkg-config file for it.
2013-10-23 22:49:52 +02:00
Vicent Martí
3fcb1d8311 Merge pull request #1905 from libgit2/cmn/list-deps
Be explicit about dependencies
2013-10-23 08:18:56 -07:00
Vicent Martí
9a5f2118e2 Merge pull request #1906 from libgit2/cmn/net-cb-errors
transport: let the progress output return an error
2013-10-23 08:17:56 -07:00
Carlos Martín Nieto
5cb136705d transport: let the progress output return an error
There are any number of issues that can come up in the progress
callback, and we should let the user cancel at that point as well.
2013-10-23 15:45:29 +02:00
Carlos Martín Nieto
ab46b1d8eb indexer: include the delta stats
The user is unable to derive the number of deltas in the pack, as that
would require them to capture the stats exactly in the moment between
download and final processing, which is abstracted away in the fetch.

Capture these numbers for the user and expose them in the progress
struct. The clone and fetch examples now also present this information
to the user.
2013-10-23 15:08:18 +02:00
Carlos Martín Nieto
ebbd48f00e examples: show used local objects in fetch
Show how many local objects were used to fix the thin pack in our fetch
example.
2013-10-23 14:22:44 +02:00
Carlos Martín Nieto
2baee9f81e README: add a note about the optional dependencies 2013-10-23 13:46:33 +02:00
Carlos Martín Nieto
1ecda61ec5 Set the correct dependencies in the pkg-config file
When linking statically, the including project needs to know what the
current library build depends on so they can link to it. Store this
information in the pkg-config file.

While here, remove claims that users need to link to zlib or libcrypto.
2013-10-23 13:46:31 +02:00
Carlos Martín Nieto
70a8c78f36 Rename the ssh credentials
The names from libssh2 are somewhat obtuse for us. We can simplify the
usual key/passphrase credential's name, as well as make clearer what the
custom signature function is.
2013-10-23 12:08:54 +02:00
Vicent Martí
1c74686e05 Merge pull request #1897 from libgit2/split-patch-from-diff
RFC: Proposed reworking of diff APIs
2013-10-22 11:55:54 -07:00
Russell Belfer
7ce60099ee Fix typo 2013-10-22 11:12:44 -07:00
Vicent Marti
98fec8a937 Implement git_odb_object_dup 2013-10-22 16:06:12 +02:00
Russell Belfer
5de4ec8104 Implement patience and minimal diff flags
It seems that to implement these options, we just have to pass
the appropriate flags through to the libxdiff code taken from
core git.  So let's do it (and add a test).
2013-10-21 15:36:38 -07:00
Russell Belfer
623460ab13 Fix warnings for win64 2013-10-21 14:16:53 -07:00
Russell Belfer
3b5f795446 Create git_diff_line and extend git_diff_hunk
Instead of having functions with so very many parameters to pass
hunk and line data, this takes the existing git_diff_hunk struct
and extends it with more hunk data, plus adds a git_diff_line.
Those structs are used to pass back hunk and line data instead of
the old APIs that took tons of parameters.

Some work that was previously only being done for git_diff_patch
creation (scanning the diff content for exact line counts) is now
done for all callbacks, but the performance difference should not
be noticable.
2013-10-21 13:42:42 -07:00
Vicent Martí
86774742a9 Merge pull request #1903 from ethomson/ssh
Allowed credential types should be a bitfield
2013-10-21 13:06:27 -07:00
Edward Thomson
2648dc1a06 Allowed credential types should be a bitfield 2013-10-21 14:02:36 -05:00