Commit Graph

8633 Commits

Author SHA1 Message Date
Edward Thomson
149d5d8a50 stash: drop unused variable 2015-06-29 21:23:09 +00:00
Edward Thomson
ded4ccab01 iterator_walk: drop unused variable 2015-06-29 21:23:09 +00:00
Jeff Hostetler
827b954ef4 Reserve aux_id 0; sort leaks by aux_id. Fix cmp. 2015-06-29 16:39:14 -04:00
Jeff Hostetler
93b4272895 Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04:00
Edward Thomson
4a0313bc4e Merge pull request #3269 from libgit2/cmn/release-fixups
Submodule and http fixes
2015-06-29 15:22:47 -05:00
Carlos Martín Nieto
8b38006018 http: don't give up on auth on the first try
When the server rejects an authentication request, ask the caller for
the credentials again, instead of giving up on the first try.
2015-06-29 21:26:40 +02:00
Carlos Martín Nieto
c28a5c972d submodule: remove trailing slashes from submodule paths
We allow looking up a submodule by path, but we lost the path
normalisation during the recent changes. Bring it back.
2015-06-29 21:10:47 +02:00
Carlos Martín Nieto
cf4030b04b submodule: remove some obsolete logic
Remove some of the logic that was left-over from the time we had a cache
of submodules, plugging a leak of the submodule object in certain cases.
2015-06-29 20:54:17 +02:00
Carlos Martín Nieto
ca2466ff40 CHANGELOG: add submodule changes 2015-06-29 15:02:19 +02:00
Vicent Marti
b977d01772 Merge pull request #3268 from libgit2/vmg/pkg-config-sort
pkg-config: Sort the different sections
2015-06-29 12:27:09 +02:00
Vicent Marti
6a5fb1f4cc pkg-config: Sort the different sections
Because of the fact that pkg-config is pants-on-head retarded and that
the Linux linker *requires* a static library to come before all its
dynamic dependencies in the link path, calling `pkg-config --libs
--static` was generating the wrong flags for linking.

Before this patch:

	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lcurl -lssh2
	-lrt -lgit2 -lssl -lcrypto -ldl -lz

After this patch:

	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lgit2 -lcurl
	-lssh2 -lrt -lssl -lcrypto -ldl -lz

By setting the "Libs" line before all other rules, we make sure that
`-lgit2` is the first library in the link path and that it gets its
symbols resolved with the libraries coming after it.

This fix (ab)uses an implementation detail in `pkg-config` (namely, that
flags are output as they are found on the file), but this detail seems
to be stable between releases and always gives a stable output.
2015-06-29 12:20:01 +02:00
Carlos Martín Nieto
84d5a98f80 Bump version to 0.23.0 and SOVERSION to 23 2015-06-28 14:53:30 +02:00
Carlos Martín Nieto
fb84cde81e Merge pull request #3267 from libgit2/cmn/libs-list
CMake: treat the ld flags as a list
2015-06-28 14:34:30 +02:00
Carlos Martín Nieto
fd2d11a178 CMake: treat the ld flags as a list
These are treated as a list by CMake itself, which means that treating
them as a simple string can put semicolons in our ld command-line if we
have libraries which are not installed on the standard locations.

Treat the variable as a CMake list and replace it with the space-delimited
list just before writing it out to our pc file.
2015-06-28 13:57:06 +02:00
Carlos Martín Nieto
fa399750c6 Merge pull request #3265 from libgit2/leaks
Plug a bunch of leaks
2015-06-27 21:26:27 +02:00
Carlos Martín Nieto
92ec9ed328 Merge pull request #3260 from ethomson/apply_with_reflog_indices
stash: test we apply using reflog-like indices
2015-06-27 21:15:00 +02:00
Carlos Martín Nieto
b4d2c7cb3a Merge pull request #3264 from arthurschreiber/fast-builds
Fast builds?
2015-06-27 20:34:04 +02:00
Arthur Schreiber
32f538ae28 Remove dependency installation file for travis builds.
We're installing dependencies via the APT addon now.
2015-06-27 15:02:53 +02:00
Arthur Schreiber
b48dfe0bbe Always install valgrind via the apt addon. 2015-06-27 14:54:19 +02:00
Carlos Martín Nieto
24fa21f38e index, iterator, fetchhead: plug leaks 2015-06-26 19:00:33 +02:00
Carlos Martín Nieto
afd8a94ee7 checkout: plug a few leaks 2015-06-26 18:49:39 +02:00
Carlos Martín Nieto
9568660f62 diff: fix leaks in diff printing 2015-06-26 18:31:39 +02:00
Carlos Martín Nieto
cfafeb843d Merge pull request #3263 from git-up/fixes
Fixes
2015-06-26 18:11:05 +02:00
Arthur Schreiber
51f8799903 Don't try to start ssh. 2015-06-26 18:05:17 +02:00
Arthur Schreiber
76d7c359af Fast builds? 2015-06-26 17:58:45 +02:00
Edward Thomson
ee6eed5188 stash: test we apply using reflog-like indices 2015-06-26 11:48:48 -04:00
Carlos Martín Nieto
354268ca48 Merge pull request #3259 from ethomson/stash_apply_argh
Stash apply: stage new files even when not updating the index
2015-06-26 17:46:35 +02:00
Carlos Martín Nieto
3c7a46978d Merge pull request #3262 from libgit2/vmg/prefix-len
Desenfuckenate prefix lookups
2015-06-26 17:45:33 +02:00
Pierre-Olivier Latour
492851c9a2 Removed unused variables 2015-06-26 08:18:06 -07:00
Pierre-Olivier Latour
cae2a55552 Fixed build failure if GIT_CURL is not defined 2015-06-26 08:17:56 -07:00
Vicent Marti
13e5e344a6 test-diff-blob: Pass proper nibble sizes 2015-06-26 16:52:26 +02:00
Vicent Marti
a2f8d1ae2b revparse: Add test to make sure this doesn't regress 2015-06-26 16:48:58 +02:00
Vicent Marti
3d9ef2dc1b Revert "object: correct the expected ID size in prefix lookup"
This reverts commit 969d4b703c.

This was a fluke from Coverity. The length to all the APIs in the
library is supposed to be passed in as nibbles, not bytes. Passing it as
bytes would prevent us from parsing uneven-sized SHA1 strings.

Also, the rest of the library was still using nibbles (including
revparse and the odb_prefix APIs), so this change was seriously breaking
things in unexpected ways. ^^
2015-06-26 16:45:42 +02:00
Carlos Martín Nieto
14888070b9 Merge pull request #3261 from libgit2/cmn/link-one-level
pc: Put libcurl and libssh2 in Libs.private
2015-06-26 16:05:05 +02:00
Carlos Martín Nieto
790cabf06a pc: Put libcurl and libssh2 in Libs.private
Pass on to whoever wants to link to libgit2 statically the flags that we
would have used for these libraries.

Putting them in Requires.private as we do now makes pkg-config put their
dependencies in the linker arguments as well, which is not what we want.
2015-06-26 13:51:41 +02:00
Carlos Martín Nieto
341818254b Merge pull request #3234 from ethomson/dont_update_index_unnecessarily
Dont update index unnecessarily
2015-06-26 11:41:14 +02:00
Pierre-Olivier Latour
c2e1b0581a Only write index if updated when passing GIT_DIFF_UPDATE_INDEX
When diffing the index with the workdir and GIT_DIFF_UPDATE_INDEX has been passed,
the previous implementation was always writing the index to disk even if it wasn't
modified.
2015-06-26 02:00:21 -04:00
Edward Thomson
619423f238 diff: test we don't update index unnecessarily
Test that workdir diffs, when presented with UPDATE_INDEX, only
write the index when they actually make a change.
2015-06-26 02:00:20 -04:00
Edward Thomson
c0280bdd15 Merge pull request #3255 from libgit2/cmn/rename-unspecified
Rename FALLBACK to UNSPECIFIED
2015-06-25 18:55:48 -04:00
Carlos Martín Nieto
552249f941 Merge pull request #3258 from arthurschreiber/patch-6
List `libcurl` in the generated `libgit2.pc`
2015-06-26 00:49:28 +02:00
Edward Thomson
b7f5cb8dd7 stash: stage new files when unstashing them
Files that were new (staged additions) in the stash tree should
be staged when unstashing, even when not applying the index.
2015-06-25 18:34:38 -04:00
Edward Thomson
8960dc1ec6 iterator: provide git_iterator_walk
Provide `git_iterator_walk` to walk each iterator in lockstep,
returning each iterator's idea of the contents of the next path.
2015-06-25 18:34:37 -04:00
Edward Thomson
82b1c93d08 stash: don't allow apply with staged changes 2015-06-25 18:34:36 -04:00
Edward Thomson
1db6a0ab52 stash apply: add a newly staged file to tests 2015-06-25 18:33:56 -04:00
Arthur Schreiber
65f2d15561 List libcurl in the generated libgit2.pc 2015-06-25 21:49:48 +02:00
Edward Thomson
3b66c6a397 Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchhead
remote: insert refspecs with no rhs in FETCH_HEAD
2015-06-25 15:36:53 -04:00
Edward Thomson
87987fd1e0 Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed
Don't allow growing borrowed buffers
2015-06-25 15:26:43 -04:00
Carlos Martín Nieto
23aa7c9037 remote: insert refspecs with no rhs in FETCH_HEAD
When a refspec contains no rhs and thus won't cause an explicit update,
we skip all the logic, but that means that we don't update FETCH_HEAD
with it, which is what the implicit rhs is.

Add another bit of logic which puts those remote heads in the list of
updates so we put them into FETCH_HEAD.
2015-06-25 13:40:38 +02:00
Carlos Martín Nieto
c2418f4613 Rename FALLBACK to UNSPECIFIED
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
2015-06-25 12:48:44 +02:00
Carlos Martín Nieto
3cf91d98e2 Add CHANGELOG entries 2015-06-24 23:49:10 +02:00