Commit Graph

6763 Commits

Author SHA1 Message Date
Vicent Marti
2bc36facce Merge pull request #2372 from libgit2/cmn/fetch-terminate
smart: send a flush when we disconnect
2014-05-21 13:07:45 +02:00
Carlos Martín Nieto
58532ed076 Merge pull request #2373 from kitbellew/fix-clone-into-mirror
Minor fix for cmn/clone-into-mirror.
2014-05-21 12:09:52 +02:00
Albert Meltzer
60cdf49583 Minor fix for cmn/clone-into-mirror.
A recently added check might skip initialization of old_fetchhead and go
directly to cleanup. So, destruct in the opposite order of construction.
2014-05-20 06:21:15 -07:00
Carlos Martín Nieto
430866d28c Fix a leak in the tests 2014-05-20 08:29:51 +02:00
Carlos Martín Nieto
ac11219b80 smart: send a flush when we disconnect
The git server wants to hear a flush from us when we disconnect,
particularly when we want to perform a fetch but are up to date.
2014-05-20 02:41:45 +02:00
Vicent Marti
588a43af54 Merge pull request #2371 from martinwoodward/attrib_fnmatch
Restore attributions for fnmatch
2014-05-19 15:43:13 +02:00
Martin Woodward
213a269a50 Restore attributions for fnmatch 2014-05-19 14:39:45 +01:00
Vicent Marti
124a45ead3 Merge pull request #2354 from libgit2/cmn/clone-into-mirror
Allow mirror-clone via `git_clone_into()`
2014-05-19 15:00:50 +02:00
Carlos Martín Nieto
32332fccc9 clone: don't error out if the branch already exists
We set up the current branch after we fetch from the remote. This means
that the user's refspec may have already created this reference. It is
therefore not an error if we cannot create the branch because it already
exists.

This allows for the user to replicate git-clone's --mirror option.
2014-05-19 14:24:43 +02:00
Carlos Martín Nieto
3c607685da clone: duplicate the remote
Instead of changing the user-provided remote, duplicate it so we can add
the extra refspec without having to worry about unsetting it before
returning.
2014-05-19 14:24:43 +02:00
Carlos Martín Nieto
b206724863 clone: add failing test for a mirror-clone with clone_into
Show a failure to perform a mirror-clone from a repository, both local
and remote.
2014-05-19 14:24:43 +02:00
Vicent Marti
52b597b66e Merge pull request #2364 from libgit2/cmn/comment-char
message: don't assume the comment char
2014-05-19 12:21:37 +02:00
Vicent Marti
138af33717 Merge pull request #2303 from jacquesg/mingw-lseek
WIP: Windows fixes
2014-05-19 12:20:31 +02:00
Philip Kelley
b2a4be1d42 Merge pull request #2365 from kitbellew/fix-indexer-mmap
Fix warning on uninitialized variable.
2014-05-18 12:22:21 -04:00
Albert Meltzer
9c4feef9f8 Fix warning on uninitialized variable. 2014-05-18 07:27:06 -07:00
Carlos Martín Nieto
49e369b29d message: don't assume the comment char
The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
2014-05-18 10:06:49 +02:00
Philip Kelley
d7a294633d Fix a bug in the pack::packbuilder suite 2014-05-17 16:58:09 -04:00
Philip Kelley
4c9ffdff76 Fix printf format string from previous commit 2014-05-17 12:45:34 -04:00
Philip Kelley
c6320bec93 print_binary_hunk: Treat types with respect 2014-05-17 12:19:32 -04:00
Philip Kelley
bf6a5b6143 Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into development 2014-05-17 11:38:03 -04:00
Vicent Marti
191ff93609 Merge pull request #2362 from libgit2/rb/update-4k-to-8k
Test and fix Git diff binary detection compatibility
2014-05-17 02:37:13 +02:00
Carlos Martín Nieto
0731a5b4db indexer: mmap fixes for Windows
Windows has its own ftruncate() called _chsize_s().

p_mkstemp() is changed to use p_open() so we can make sure we open for
writing; the addition of exclusive create is a good thing to do
regardless, as we want a temporary path for ourselves.

Lastly, MSVC doesn't quite know how to add two numbers if one of them is a
void pointer, so let's alias it to unsigned char.C
2014-05-17 01:39:43 +02:00
Carlos Martín Nieto
f7310540ae indexer: use mmap for writing
Some OSs cannot keep their ideas about file content straight when mixing
standard IO with file mapping. As we use mmap for reading from the
packfile, let's make writing to the pack file use mmap.
2014-05-17 01:39:43 +02:00
Russell Belfer
8af4966db1 Git binary check compat tests
A variety of data patterns for diffs verified to match the
behavior of binary detection with Git on the command line.
2014-05-16 16:30:58 -07:00
Russell Belfer
d0f00de4d8 Increase binary detection len to 8k 2014-05-16 11:08:19 -07:00
Russell Belfer
adebcb1645 Merge pull request #2360 from phkelley/noinherit
Win32: Supply _O_NOINHERIT when calling _wopen
2014-05-16 10:42:17 -07:00
Philip Kelley
f0b820dd67 Win32: Supply _O_NOINHERIT when calling _wopen 2014-05-16 12:38:56 -04:00
Vicent Marti
228272ef58 Merge pull request #2313 from libgit2/cmn/remote-delete
Remote deletion
2014-05-16 11:56:37 +02:00
Carlos Martín Nieto
ec8a949a58 remote: remove remote-tracking branches on delete
When we delete a remote, we also need to go through its fetch refspecs
and remove the references they create locally.
2014-05-16 10:02:07 +02:00
Russell Belfer
8e1b5a8dc6 Merge pull request #2357 from libgit2/cmn/pack-cache-init
pack: init the cache on packfile alloc
2014-05-15 15:31:13 -07:00
Vicent Marti
88b1b36dfc Merge pull request #2356 from libgit2/rb/restore-search-paths
Better global search path sandboxing in tests
2014-05-15 20:25:54 +02:00
Carlos Martín Nieto
649214be4b pack: init the cache on packfile alloc
When running multithreaded, it is not enough to check for the offmap
allocation. Move the call to cache_init() to packfile allocation so we
can be sure it is always allocated free of races.

This fixes #2355.
2014-05-15 19:59:05 +02:00
Russell Belfer
8487e23797 Better search path sandboxing
There are a number of tests that modify the global or system
search paths during the tests.  This adds a helper function to
make it easier to restore those paths and makes sure that they
are getting restored in a manner that preserves test isolation.
2014-05-15 10:56:28 -07:00
Philip Kelley
4af0ef9690 Fix mutex init/free in config_file.c 2014-05-15 11:09:49 -04:00
Vicent Marti
7851e595ad Merge pull request #2351 from linquize/init-var
Initialize local variable
2014-05-14 16:05:23 +02:00
Vicent Marti
2bcc1afd10 Merge pull request #2349 from libgit2/rb/coverity-fixes
Increase config snapshot usage
2014-05-14 12:20:24 +02:00
Vicent Marti
a8af3e0284 Merge pull request #2348 from stewid/add-link-R-bindings
Add R bindings to the README
2014-05-14 12:18:57 +02:00
Russell Belfer
2b52a0bfae Increase use of config snapshots
And decrease extra reload checks of config data.
2014-05-13 16:32:27 -07:00
Russell Belfer
a37aa82ea6 Some coverity inspired cleanups 2014-05-13 15:54:23 -07:00
Stefan Widgren
562516eceb Add R bindings to the README 2014-05-13 22:43:59 +02:00
Linquize
b3f27c4368 Initialize local variable 2014-05-13 21:08:50 +08:00
Vicent Marti
03fcef1889 Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be
Improve checks for ignore containment
2014-05-13 12:40:13 +02:00
Vicent Marti
bcf9792f08 Merge pull request #2330 from libgit2/cmn/pack-unpack-loop
Make pack object lookup use loops
2014-05-13 12:36:51 +02:00
Vicent Marti
e161962634 Merge pull request #2346 from kitbellew/fix2300
Minor fix for previously merged netops code.
2014-05-13 12:35:56 +02:00
Albert Meltzer
7c57cd97d8 Win32 fix for #2300.
The code doesn't use SSL and a test requires it.
2014-05-12 20:51:03 -07:00
Carlos Martín Nieto
c968ce2c2c pack: don't forget to cache the base object
The base object is a good cache candidate, so we shouldn't forget to add
it to the cache.
2014-05-13 02:48:52 +02:00
Carlos Martín Nieto
15bcced223 pack: use stack allocation for smaller delta chains
This avoid allocating the array on the heap for relatively small
chains. The expected performance increase is sadly not really
noticeable.
2014-05-13 02:48:52 +02:00
Carlos Martín Nieto
a3ffbf230e pack: expose a cached delta base directly
Instead of going through a special entry in the chain, let's pass it as
an output parameter.
2014-05-13 02:48:48 +02:00
Russell Belfer
df3419269b Merge pull request #2336 from libgit2/rb/unicode-branch-names
Pass unconverted Unicode path data when iconv doesn't like it
2014-05-12 10:51:56 -07:00
Russell Belfer
af567e8853 Merge pull request #2334 from libgit2/rb/fix-2333
Be more careful with user-supplied buffers
2014-05-12 10:44:13 -07:00