Eoin Coffey
97fc71ab3b
Add support for --author flag in example log implementation
2014-05-22 17:22:45 -06:00
Carlos Martín Nieto
9331f98aca
smart: initialize the error variable
2014-05-22 12:52:31 +02:00
Carlos Martín Nieto
4c4408c351
Plug leaks and fix a C99-ism
...
We have too many places where we repeat free code, so when adding the
new free to the generic code, it didn't take for the local transport.
While there, fix a C99-ism that sneaked through.
2014-05-22 12:28:39 +02:00
Vicent Marti
a598264463
Merge pull request #2376 from libgit2/cmn/remote-symref
...
Add support for the symref extension
2014-05-22 02:28:42 +02:00
Vicent Marti
7ee233a920
Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform
...
Make core.safecrlf not generate an error on LF-ending platforms
2014-05-22 02:27:33 +02:00
Vicent Marti
ff9fb4484b
Merge pull request #2379 from ethomson/status_win32
...
Include windows.h on win32 for Sleep
2014-05-22 02:26:56 +02:00
Edward Thomson
ead9c591ef
Include windows.h on win32 for Sleep
2014-05-21 17:25:00 -07:00
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
2a59711658
clone: get rid of head_info
...
Since we no longer need to push data to callbacks, there's no need for
this truct.
2014-05-21 12:12:33 +02:00
Carlos Martín Nieto
cdb8a60824
clone: make use of the remote's default branch guessing
...
Let's use the remote's default branch guessing instead of reinventing
one ourselves with callbacks.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
d22db24fb7
remote: add api to guess the remote's default branch
...
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
04865aa05e
local transport: expose the symref data
...
When using the local transport, we always have the symbolic information
available, so fill it.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
306475eb01
remote: expose the remote's symref mappings
...
Add a symref_target field to git_remote_head to expose the symref
mappings to the user.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
8156835df1
smart: store reported symrefs
...
The protocol has a capability which allows the server to tell us which
refs are symrefs, so we can e.g. know which is the default branch.
This capability is different from the ones we already support, as it's
not setting a flag to true, but requires us to store a list of
refspec-formatted mappings.
This commit does not yet expose the information in the reference
listing.
2014-05-21 12:12:32 +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
Russell Belfer
c094197bf9
Just don't CRLF filter if there are no CRs
2014-05-19 15:05:39 -07:00
Russell Belfer
16798d08cf
Make core.safecrlf work on LF-ending platforms
...
If you enabled core.safecrlf on an LF-ending platform, we would
error even for files with all LFs. We should only be warning on
irreversible mappings, I think.
2014-05-19 14:57:09 -07: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