Carlos Martín Nieto
c23002c560
Merge pull request #2929 from ethomson/clar_update
...
Update to clar 2b73f5e
2015-03-01 21:04:51 +01:00
Carlos Martín Nieto
18fcb5c813
Merge pull request #2928 from ethomson/rebase_alloc_check
...
rebase: check alloc result
2015-03-01 21:00:11 +01:00
Edward Thomson
496b76d415
checkout tests: just use SAFE where appropriate
2015-02-27 13:50:48 -05:00
Edward Thomson
96b82b11c6
checkout: remove GIT_CHECKOUT_SAFE_CREATE
as a strategy
2015-02-27 13:50:44 -05:00
Edward Thomson
14fec0aea3
example: drop SAFE_CREATE
from clone example
2015-02-27 13:50:40 -05:00
Edward Thomson
6c9e86adaf
clone: drop now unnecessary SAFE_CREATE
2015-02-27 13:50:36 -05:00
Edward Thomson
e6da3e4496
checkout: upgrade to SAFE_CREATE
when no index file
...
When the repository does not contain an index, emulate git's behavior
and upgrade to `SAFE_CREATE`. This allows us to check out repositories
created with `git clone --no-checkout`.
2015-02-27 13:50:32 -05:00
Edward Thomson
5cbe950fb8
merge perf test: drop unnecessary SAFE_CREATE
2015-02-27 13:47:34 -05:00
Edward Thomson
094cfc2904
cherrypick, revert: drop unnecessary SAFE_CREATE
2015-02-27 13:47:30 -05:00
Edward Thomson
fb2f3a76aa
Merge pull request #2922 from ethomson/more_explaining_threads_is_more_better
...
README: provide some more explanation about TLS
2015-02-27 00:37:20 -05:00
Edward Thomson
cfcb346d94
Update to clar 2b73f5e
2015-02-27 00:30:50 -05:00
Edward Thomson
3cbaa5872c
rebase: check alloc result
2015-02-27 04:39:54 +00:00
Damien PROFETA
a275fbc0f7
Add API to add a memory buffer to an index
...
git_index_add_frombuffer enables now to store a memory buffer in the odb
and to store an entry in the index directly if the index is attached to a
repository.
2015-02-25 10:24:13 +01:00
Edward Thomson
ecf1c3c358
README: provide some more explanation about TLS
2015-02-23 11:19:32 -05:00
Carlos Martín Nieto
366e53d3da
Merge pull request #2921 from libgit2/ntk/macosx_build_cherrypicked
...
Fix MAX 32 bit build problem described in libgit2/libgit2#2917
2015-02-20 19:40:45 +01:00
Jeff Hostetler
c92987d157
Fix MAX 32 bit build problem described in libgit2/libgit2#2917
2015-02-20 18:59:43 +01:00
Carlos Martín Nieto
5091aff782
Merge pull request #2907 from jasonhaslam/git_packfile_unpack_race
...
Fix race in git_packfile_unpack.
2015-02-20 08:40:40 +01:00
Carlos Martín Nieto
d15884ce84
Merge pull request #2911 from ethomson/streaming_filters
...
Streaming filters
2015-02-19 20:39:20 +01:00
Edward Thomson
feb0e02286
tests: separate INVASIVE filesystem tests
...
Introduce GITTEST_INVASIVE_FS_STRUCTURE for things that are invasive
to your filesystem structure (like creating folders at your filesystem
root) and GITTEST_INVASIVE_FS_SIZE for things that write lots of data.
2015-02-19 12:14:06 -05:00
Edward Thomson
9c9aa1bad3
filter: take temp_buf
in git_filter_options
2015-02-19 11:45:46 -05:00
Edward Thomson
d05218b06f
filter: add git_filter_list__load_ext
...
Refactor `git_filter_list__load_with_attr_reader` into
`git_filter_list__load_ext`, which takes a `git_filter_options`.
2015-02-19 11:25:26 -05:00
Edward Thomson
795eaccd66
git_filter_opt_t -> git_filter_flag_t
...
For consistency with the rest of the library, where an opt is an
options *structure*.
2015-02-19 11:09:54 -05:00
Edward Thomson
d4cf167515
buffer: introduce git_buf_attach_notowned
...
Provide a convenience function that creates a buffer that can be provided
to callers but will not be freed via `git_buf_free`, so the buffer
creator maintains the allocation lifecycle of the buffer's contents.
2015-02-19 10:05:33 -05:00
Carlos Martín Nieto
818302c853
Merge pull request #2820 from leoyanggit/mac_build
...
Fix Mac build without OpenSSL
2015-02-19 11:19:17 +01:00
Edward Thomson
09866d6f84
stash: correctly stash wd modified/index deleted
2015-02-18 11:26:03 -05:00
Edward Thomson
b49edddcd0
checkout: let the stream writer close the fd
2015-02-18 10:24:43 -05:00
Edward Thomson
f7c0125f47
filter streams: base -> parent
2015-02-18 10:24:34 -05:00
Edward Thomson
b75f15aaf1
git_writestream: from git_filter_stream
2015-02-18 10:24:23 -05:00
Edward Thomson
8c2dfb38db
filter: test a large file through the stream
...
Test pushing a file on-disk into a streaming filter that compresses
it into the ODB, and inflates it back into the working directory.
2015-02-17 17:00:57 -05:00
Edward Thomson
646364e780
checkout: maintain temporary buffer for filters
...
Let the filters use the checkout data's temporary buffer, instead
of having to allocate new buffers each time.
2015-02-17 16:03:45 -05:00
Edward Thomson
e78f5c9f42
checkout: stream the blob into the filters
...
Use the new streaming filter API during checkout.
2015-02-17 15:57:10 -05:00
Edward Thomson
5555696f8a
filters: stream internally
...
Migrate the `git_filter_list_apply_*` functions over to using the
new filter streams.
2015-02-17 15:57:04 -05:00
Leo Yang
2d2aa1ff6e
Fix Mac build without OpenSSL
...
If OpenSSL is disabled on Mac the SHA1 implementation goes
to the CommonCrypto from the system. In this case we should
not include the generic hash impl. Otherwise there would be
duplicated impls which fail the build.
2015-02-17 12:03:25 -05:00
Edward Thomson
fbdc9db364
filters: introduce streaming filters
...
Add structures and preliminary functions to take a buffer, file or
blob and write the contents in chunks through an arbitrary number
of chained filters, finally writing into a user-provided function
accept the contents.
2015-02-17 02:19:05 -05:00
Carlos Martín Nieto
437ba9ad65
Merge pull request #2909 from stewid/remove_extra_semicolon
...
Remove extra semicolon outside of a function
2015-02-16 03:14:32 +01:00
Stefan Widgren
c8e02b8776
Remove extra semicolon outside of a function
...
Without this change, compiling with gcc and pedantic generates warning:
ISO C does not allow extra ‘;’ outside of a function.
2015-02-15 21:07:05 +01:00
Jason Haslam
8588cb0cbf
Fix race in git_packfile_unpack.
...
Increment refcount of newly added cache entries just like existing
entries looked up from the cache. Otherwise the new entry can be
evicted from the cache and destroyed while it's still in use.
2015-02-14 23:43:26 -07:00
Carlos Martín Nieto
a291790a8d
Merge pull request #2831 from ethomson/merge_lock
...
merge: lock index during the merge (not just checkout)
2015-02-15 05:18:01 +01:00
Carlos Martín Nieto
a7fa970f8b
Merge pull request #2895 from ethomson/alloc_overflow
...
allocations: test for overflow of requested size
2015-02-15 05:13:50 +01:00
Carlos Martín Nieto
b23c206e59
Merge pull request #2903 from ethomson/rebase
...
Fixups for rebase
2015-02-15 05:03:51 +01:00
Edward Thomson
41fae48df2
indexwriter: an indexwriter for repo operations
...
Provide git_indexwriter_init_for_operation for the common locking
pattern in merge, rebase, revert and cherry-pick.
2015-02-14 09:25:36 -05:00
Edward Thomson
be8404a768
merge-like operations: lock index while working
2015-02-14 09:25:35 -05:00
Edward Thomson
8b0ddd5dd9
merge: lock the index at the start of the merge
...
Always lock the index when we begin the merge, before we write
any of the metdata files. This prevents a race where another
client may run a commit after we have written the MERGE_HEAD but
before we have updated the index, which will produce a merge
commit that is treesame to one parent. The merge will finish and
update the index and the resultant commit would not be a merge at
all.
2015-02-14 09:25:35 -05:00
Edward Thomson
8639ea5f98
checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEX
2015-02-14 09:25:35 -05:00
Edward Thomson
55798fd153
git_indexwriter: lock then write the index
...
Introduce `git_indexwriter`, to allow us to lock the index while
performing additional operations, then complete the write (or abort,
unlocking the index).
2015-02-14 09:25:35 -05:00
Edward Thomson
42f98a26a5
merge test: test an actual failure, not conflict
...
Correct the merge failed cleanup test. Merge data should not be
cleaned up on conflicts, only on actual failure. And ORIG_HEAD
should not be removed at all.
2015-02-13 11:44:34 -05:00
Edward Thomson
ffbd51edc8
rebase: CHECKOUT_SAFE
instead of FORCE
...
Switch to a standard branch-switching pattern of a `SAFE` checkout,
then updating `HEAD`.
2015-02-13 11:38:00 -05:00
Edward Thomson
49b8293c75
rebase: allow NULL
branch to indicate HEAD
...
Don't require the branch to rebase, if given `NULL`, simply look up
`HEAD`.
2015-02-13 11:20:32 -05:00
Edward Thomson
92e87dd749
rebase: provide NULL exec
on non-EXEC operations
...
Users may want to try to pay attention to the `exec` field on all
rebase operations.
2015-02-13 10:44:19 -05:00
Carlos Martín Nieto
57f45e7f4d
Merge pull request #2901 from ethomson/win32_mode_bits
...
win32: limit the mode to `_wopen`/`_waccess`
2015-02-13 15:58:39 +01:00