Commit Graph

5401 Commits

Author SHA1 Message Date
nulltoken
a8d67afe42 revparse: Prevent unnecessary odb backend calls 2013-09-07 17:48:05 +02:00
Russell Belfer
32e4992972 Merge pull request #1791 from libgit2/cmn/revwalk-recursive
revwalk: make mark_unintersting use a loop
2013-09-06 14:20:51 -07:00
Russell Belfer
97affdf213 Merge pull request #1815 from libgit2/ntk/topic/stream_write/check_before_overwriting
Ask the odbbackend if the object exists before overwriting it
2013-09-06 14:13:12 -07:00
nulltoken
4047950f30 odb: Prevent stream_finalize_write() from overwriting
Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend.

This commit gives a chance to the backend to check if it already knows this object.
2013-09-06 22:47:28 +02:00
nulltoken
ae4a486605 blob: Slightly enforce a create_fromchunks() test 2013-09-06 22:21:37 +02:00
Carlos Martín Nieto
fb23d05f0b revwalk: make mark_unintersting use a loop
Using a recursive function can blow the stack when dealing with long
histories. Use a loop instead to limit the call chain depth.

This fixes #1223.
2013-09-06 19:56:51 +02:00
Vicent Martí
366bd2f43d Merge pull request #1829 from libgit2/fix-umask-fragility
Fix umask fragility
2013-09-05 16:56:21 -07:00
Russell Belfer
a7fcc44dcf Better macro name for is-exec-bit-set test 2013-09-05 16:14:32 -07:00
Russell Belfer
af22dabb43 GIT_MODE_TYPE should exclude setgid bits
The GIT_MODE_TYPE macro was looking at all bits above the
permissions, but it should really just look at the top bits so
that it will give the right results for a setgid or setuid entry.

Since we're now using these macros in the tests, this was causing
a test failure on platforms that don't support setgid.
2013-09-05 12:01:17 -07:00
Russell Belfer
c97d407d9c Fix tests of file modes
This fixes an issue checking file modes in the tests that
initialize a repo from a template directory when a symlink is
used in the template.  Also, this updates some other places where
we are examining file modes to use the new macros.
2013-09-05 11:45:29 -07:00
Russell Belfer
f240acce86 Add more file mode permissions macros
This adds some more macros for some standard operations on file
modes, particularly related to permissions, and then updates a
number of places around the code base to use the new macros.
2013-09-05 11:20:12 -07:00
Russell Belfer
27061b151a Fix some newer GCC compiler warnings 2013-09-05 10:25:16 -07:00
Vicent Martí
cca9bea484 Merge pull request #1831 from linquize/version.h-warning
Fix warning in src/win32/version.h
2013-09-05 06:30:08 -07:00
Linquize
21753d4869 Fix warning in src/win32/version.h 2013-09-05 20:42:47 +08:00
Russell Belfer
9ce4f7da4a Fix tests to use core.filemode correctly
Some windows tests were failing
2013-09-04 16:41:34 -07:00
Russell Belfer
2a54c7f447 _umask is function name on Windows 2013-09-04 16:24:36 -07:00
Russell Belfer
abfed59c27 Clean up one other mode_t assertion 2013-09-04 16:23:00 -07:00
Russell Belfer
780f3e540f Make tests take umask into account
It seems that libgit2 is correctly applying the umask when
initializing a repository from a template and when creating new
directories during checkout, but the test suite is not accounting
for possible variations due to the umask.  This updates that so
that the test suite will work regardless of the umask.
2013-09-04 16:23:00 -07:00
Russell Belfer
cf94024c58 Update clar 2013-09-04 16:23:00 -07:00
Ben Straub
61d57b7a21 Test pushing to remotes with "file:///" urls 2013-09-04 14:27:59 -07:00
Ben Straub
f42d546c63 Provide better errors for push on non-bare local remotes 2013-09-04 13:07:42 -07:00
Vicent Martí
e98535923b Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities
Of backends and refreshers...
2013-09-04 06:20:36 -07:00
Vicent Marti
74b38d199e Backport @peff's fix for duplicates in sha1_lookup 2013-09-04 13:16:57 +02:00
nulltoken
b1a6c316a6 odb: Move the auto refresh logic to the pack backend
Previously, `git_object_read()`, `git_object_read_prefix()` and
`git_object_exists()` were implementing an auto refresh logic. When the
expected object couldn't be found in any backend, a call to
`git_odb_refresh()` was triggered and the lookup was once again performed
against all backends.

This commit removes this auto-refresh logic from the odb layer and pushes
it down into the pack-backend (as it's the only one currently exposing
a `refresh()` endpoint).
2013-09-04 07:44:53 +02:00
Vicent Martí
6700cb9925 Merge pull request #1828 from libgit2/examples-cmakelists
Split examples CMakeLists.txt
2013-09-03 15:54:45 -07:00
Russell Belfer
60ee53dfce Split examples CMakeLists.txt
Also, this converts the examples/CMakeLists.txt from explicitly
listing to just globbing for all the individual C files.
2013-09-03 15:20:16 -07:00
Russell Belfer
d31e5655c2 Merge pull request #1827 from libgit2/relative-path-win32-fix
Fix resolving relative windows network paths
2013-09-03 15:19:13 -07:00
Russell Belfer
cae5293854 Fix resolving relative windows network paths 2013-09-03 14:00:27 -07:00
Russell Belfer
0d1af399e9 don't use inline in tests for win32 2013-09-03 12:33:34 -07:00
Vicent Martí
6208bd499b Merge pull request #1804 from ethomson/rewrites
Minor changes for rewrites
2013-09-03 12:29:18 -07:00
Russell Belfer
37fc44ddff Merge pull request #1825 from nvloff/resolve_relative
path: properly resolve relative paths
2013-09-03 12:27:56 -07:00
Nikolai Vladimirov
6d9a6c5cec path: properly resolve relative paths 2013-09-03 20:45:53 +03:00
Vicent Martí
b595b385df Merge pull request #1814 from libgit2/is-empty-fix
Fix incorrect precedence within git_repository_is_empty()
2013-09-03 04:11:07 -07:00
Vicent Martí
c46fe0c651 Merge pull request #1823 from kadamski/building4android
Small changes enabling compiling libgit2 for Android.
2013-09-02 03:01:40 -07:00
Vicent Martí
7b2b6da661 Merge pull request #1822 from kadamski/examples-cleanup
Small cleanup in examples.
2013-09-01 13:39:11 -07:00
Krzysztof Adamski
01cd5ae377 Add instructions about buiding for Android to README.md 2013-09-01 19:48:01 +02:00
Krzysztof Adamski
5c37f00505 Build all example files if BUILD_EXAMPLES used. 2013-09-01 19:00:16 +02:00
Krzysztof Adamski
255836ddac Adding credentials callback to ls-remote and fetch too. 2013-09-01 19:00:16 +02:00
Krzysztof Adamski
d6d523486c Removing unneeded code duplication in ls-remote.c 2013-09-01 19:00:16 +02:00
Krzysztof Adamski
3b75b684a1 Define S_IREAD i S_IWRITE for Android. 2013-09-01 18:53:07 +02:00
Krzysztof Adamski
b1447edebc Use git__insertsort_r on Android too. 2013-09-01 18:47:56 +02:00
Krzysztof Adamski
82b2fc2c83 Create ANDROID build option
CMake seems not to support Android as a target and this option
lets us test this in CMakeLists.txt.
2013-09-01 18:45:36 +02:00
Vicent Martí
ac2e7dc6fb Merge pull request #1820 from linquize/git_oid_streq
Update documentation of git_oid_streq to remove outdated error code
2013-09-01 08:40:48 -07:00
Vicent Martí
ce9390858f Merge pull request #1819 from linquize/git_oid_shorten_add
oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full
2013-09-01 08:40:10 -07:00
Carlos Martín Nieto
f2cda906e5 Point to the right Go bindings 2013-08-31 17:42:38 +02:00
Carlos Martín Nieto
749871c240 Merge pull request #1821 from n1rvana/development
Update readme to point to the currently maintained Erlang bindings.
2013-08-31 08:40:49 -07:00
Nirvana
a402179ae5 Update readme to point to the currently maintained Erlang bindings. Namely: https://github.com/carlosmn/geef 2013-08-31 09:25:25 -04:00
Linquize
d45e9480e7 oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full 2013-08-31 18:22:50 +08:00
Linquize
e68938e0b9 Update documentation of git_oid_streq to remove outdated error code 2013-08-31 18:19:44 +08:00
nulltoken
9b4ed214f4 odb: Code beautification 2013-08-30 23:19:02 +02:00