summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | smart: initialize the error variableCarlos Martín Nieto2014-05-221-1/+1
| |
* | Plug leaks and fix a C99-ismCarlos Martín Nieto2014-05-223-13/+16
| | | | | | | | | | | | | | 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.
* | Merge pull request #2376 from libgit2/cmn/remote-symrefVicent Marti2014-05-227-98/+193
|\ \ | | | | | | Add support for the symref extension
| * | clone: get rid of head_infocmn/remote-symrefCarlos Martín Nieto2014-05-211-23/+12
| | | | | | | | | | | | | | | Since we no longer need to push data to callbacks, there's no need for this truct.
| * | clone: make use of the remote's default branch guessingCarlos Martín Nieto2014-05-211-67/+17
| | | | | | | | | | | | | | | Let's use the remote's default branch guessing instead of reinventing one ourselves with callbacks.
| * | remote: add api to guess the remote's default branchCarlos Martín Nieto2014-05-211-0/+47
| | | | | | | | | | | | | | | If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
| * | local transport: expose the symref dataCarlos Martín Nieto2014-05-211-4/+18
| | | | | | | | | | | | | | | When using the local transport, we always have the symbolic information available, so fill it.
| * | remote: expose the remote's symref mappingsCarlos Martín Nieto2014-05-212-0/+20
| | | | | | | | | | | | | | | Add a symref_target field to git_remote_head to expose the symref mappings to the user.
| * | smart: store reported symrefsCarlos Martín Nieto2014-05-213-7/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platformVicent Marti2014-05-221-0/+4
|\ \ \ | | | | | | | | Make core.safecrlf not generate an error on LF-ending platforms
| * | | Just don't CRLF filter if there are no CRsrb/safecrlf-on-lf-platformRussell Belfer2014-05-191-3/+5
| | | |
| * | | Make core.safecrlf work on LF-ending platformsRussell Belfer2014-05-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2372 from libgit2/cmn/fetch-terminateVicent Marti2014-05-211-0/+12
|\ \ \ \ | |_|/ / |/| | | smart: send a flush when we disconnect
| * | | smart: send a flush when we disconnectcmn/fetch-terminateCarlos Martín Nieto2014-05-201-0/+12
| |/ / | | | | | | | | | | | | 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.
* | | Minor fix for cmn/clone-into-mirror.Albert Meltzer2014-05-201-4/+2
|/ / | | | | | | | | A recently added check might skip initialization of old_fetchhead and go directly to cleanup. So, destruct in the opposite order of construction.
* | Merge pull request #2371 from martinwoodward/attrib_fnmatchVicent Marti2014-05-192-3/+58
|\ \ | | | | | | Restore attributions for fnmatch
| * | Restore attributions for fnmatchMartin Woodward2014-05-192-3/+58
| | |
* | | Merge pull request #2354 from libgit2/cmn/clone-into-mirrorVicent Marti2014-05-191-15/+16
|\ \ \ | |/ / |/| | Allow mirror-clone via `git_clone_into()`
| * | clone: don't error out if the branch already existscmn/clone-into-mirrorCarlos Martín Nieto2014-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | clone: duplicate the remoteCarlos Martín Nieto2014-05-191-15/+12
| | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #2364 from libgit2/cmn/comment-charVicent Marti2014-05-191-2/+2
|\ \ \ | | | | | | | | message: don't assume the comment char
| * | | message: don't assume the comment charcmn/comment-charCarlos Martín Nieto2014-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2303 from jacquesg/mingw-lseekVicent Marti2014-05-193-2/+3
|\ \ \ \ | | | | | | | | | | WIP: Windows fixes
| * | | | git_pool_mallocsz takes an unsigned longJacques Germishuys2014-05-011-1/+1
| | | | |
| * | | | _InterlockedExchange expects a volatile LONGJacques Germishuys2014-05-011-1/+1
| | | | |
| * | | | Undef lseek firstJacques Germishuys2014-05-011-0/+1
| | | | |
* | | | | Fix warning on uninitialized variable.Albert Meltzer2014-05-181-1/+1
| |/ / / |/| | |
* | | | Fix printf format string from previous commitPhilip Kelley2014-05-171-1/+1
| | | |
* | | | print_binary_hunk: Treat types with respectPhilip Kelley2014-05-171-7/+24
| | | |
* | | | Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into developmentPhilip Kelley2014-05-178-73/+111
|\ \ \ \
| * | | | indexer: mmap fixes for Windowscmn/indexer-mmapCarlos Martín Nieto2014-05-174-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | indexer: use mmap for writingCarlos Martín Nieto2014-05-176-72/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #2362 from libgit2/rb/update-4k-to-8kVicent Marti2014-05-173-2/+11
|\ \ \ \ \ | |/ / / / |/| | | | Test and fix Git diff binary detection compatibility
| * | | | Increase binary detection len to 8kRussell Belfer2014-05-163-2/+11
| | | | |
* | | | | Win32: Supply _O_NOINHERIT when calling _wopenPhilip Kelley2014-05-161-2/+11
| |_|_|/ |/| | |
* | | | Merge pull request #2313 from libgit2/cmn/remote-deleteVicent Marti2014-05-161-3/+145
|\ \ \ \ | |/ / / |/| | | Remote deletion
| * | | remote: remove remote-tracking branches on deleteCarlos Martín Nieto2014-05-161-4/+54
| | | | | | | | | | | | | | | | | | | | When we delete a remote, we also need to go through its fetch refspecs and remove the references they create locally.
| * | | remote: move branch upstream deletion to use an iteratorCarlos Martín Nieto2014-04-301-57/+38
| | | | | | | | | | | | | | | | This should make it more readable and allocate a bunch fewer strings.
| * | | remote: Introduce git_remote_delete()nulltoken2014-04-301-3/+114
| | | |
* | | | pack: init the cache on packfile alloccmn/pack-cache-initCarlos Martín Nieto2014-05-151-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Fix mutex init/free in config_file.cPhilip Kelley2014-05-151-1/+4
| |_|/ |/| |
* | | Merge pull request #2351 from linquize/init-varVicent Marti2014-05-141-1/+1
|\ \ \ | | | | | | | | Initialize local variable
| * | | Initialize local variableLinquize2014-05-131-1/+1
| | | |
* | | | Increase use of config snapshotsrb/coverity-fixesRussell Belfer2014-05-137-53/+69
| | | | | | | | | | | | | | | | And decrease extra reload checks of config data.
* | | | Some coverity inspired cleanupsRussell Belfer2014-05-134-20/+24
|/ / /
* | | Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-beVicent Marti2014-05-137-105/+112
|\ \ \ | | | | | | | | Improve checks for ignore containment
| * | | Improve checks for ignore containmentrb/how-broken-can-ignores-beRussell Belfer2014-05-067-105/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff code was using an "ignored_prefix" directory to track if a parent directory was ignored that contained untracked files alongside tracked files. Unfortunately, when negative ignore rules were used for directories inside ignored parents, the wrong rules were applied to untracked files inside the negatively ignored child directories. This commit moves the logic for ignore containment into the workdir iterator (which is a better place for it), so the ignored-ness of a directory is contained in the frame stack during traversal. This allows a child directory to override with a negative ignore and yet still restore the ignored state of the parent when we traverse out of the child. Along with this, there are some problems with "directory only" ignore rules on container directories. Given "a/*" and "!a/b/c/" (where the second rule is a directory rule but the first rule is just a generic prefix rule), then the directory only constraint was having "a/b/c/d/file" match the first rule and not the second. This was fixed by having ignore directory-only rules test a rule against the prefix of a file with LEADINGDIR enabled. Lastly, spot checks for ignores using `git_ignore_path_is_ignored` were tested from the top directory down to the bottom to deal with the containment problem, but this is wrong. We have to test bottom to top so that negative subdirectory rules will be checked before parent ignore rules. This does change the behavior of some existing tests, but it seems only to bring us more in line with core Git, so I think those changes are acceptable.
* | | | Merge pull request #2330 from libgit2/cmn/pack-unpack-loopVicent Marti2014-05-132-78/+211
|\ \ \ \ | | | | | | | | | | Make pack object lookup use loops
| * | | | pack: don't forget to cache the base objectcmn/pack-unpack-loopCarlos Martín Nieto2014-05-131-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The base object is a good cache candidate, so we shouldn't forget to add it to the cache.
| * | | | pack: use stack allocation for smaller delta chainsCarlos Martín Nieto2014-05-131-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoid allocating the array on the heap for relatively small chains. The expected performance increase is sadly not really noticeable.