src


Log

Author Commit Date CI Message
Vicent Marti 31c55152 2014-05-29T14:50:57 Merge pull request #2011 from libgit2/cmn/clone-local Local clone
Carlos Martín Nieto 2614819c 2014-05-28T11:28:57 clone: allow for linking in local clone If requested, git_clone_local_into() will try to link the object files instead of copying them. This only works on non-Windows (since it doesn't have this) when both are on the same filesystem (which are unix semantics).
Carlos Martín Nieto 121b2673 2013-12-23T11:12:31 clone: add flags to override whether to perform a local clone
Carlos Martín Nieto a0b5f785 2013-12-22T15:39:54 clone: store the realpath when given a relative one A call like git_clone("./foo", "./foo1") writes origin's url as './foo', which makes it unusable, as they're relative to different things. Go with git's behaviour and store the realpath as the url.
Carlos Martín Nieto 94f742ba 2014-05-28T10:18:05 fileops: allow linking files when copying directory structures When passed the LINK_FILES flag, the recursive copy will hardlink files instead of copying them.
Carlos Martín Nieto c1dbfcbb 2014-05-28T10:07:23 clone: add flag not to link
Carlos Martín Nieto 4386d80b 2013-12-21T17:18:21 clone: perform a "local clone" when given a local path When git is given such a path, it will perform a "local clone", bypassing the git-aware protocol and simply copying over all objects that exist in the source. Copy this behaviour when given a local path.
Vicent Marti 5d91bea2 2014-05-28T13:55:57 Merge pull request #2380 from libgit2/cmn/index-add-modes index: check for valid filemodes on add
Vicent Marti 07c0eacd 2014-05-28T13:50:58 Merge pull request #2359 from e45lee/chmod-fix Fixed permissions on template directories.
Edward Thomson eff531e1 2014-05-27T20:58:20 Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
Edward Thomson de3f851e 2014-05-21T09:44:05 Staticify `merge_config`
Edward Thomson 22ab8881 2014-05-20T22:07:15 Use a config snapshot
Edward Thomson a3622ba6 2014-05-16T13:54:40 Move GIT_MERGE_CONFIG_* to its own enum
Edward Thomson d362093f 2014-05-08T15:41:36 Introduce GIT_MERGE_CONFIG_* for merge.ff settings git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when merge.ff=true
Edward Lee 517341c5 2014-05-23T22:41:35 Address style concerns in setting mkdir/copy flags.
Carlos Martín Nieto 530594c0 2014-05-23T05:53:41 odb: clear backend errors on successful read We go through the different backends in order, so it's not an error if at least one of the backends has the data we want.
Carlos Martín Nieto 052a2ffd 2014-05-22T16:01:02 index: check for valid filemodes on add
Carlos Martín Nieto 9331f98a 2014-05-22T12:52:31 smart: initialize the error variable
Carlos Martín Nieto 4c4408c3 2014-05-22T12:28:39 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.
Vicent Marti a5982644 2014-05-22T02:28:42 Merge pull request #2376 from libgit2/cmn/remote-symref Add support for the symref extension
Vicent Marti 7ee233a9 2014-05-22T02:27:33 Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform Make core.safecrlf not generate an error on LF-ending platforms
Vicent Marti 2bc36fac 2014-05-21T13:07:45 Merge pull request #2372 from libgit2/cmn/fetch-terminate smart: send a flush when we disconnect
Carlos Martín Nieto 2a597116 2014-05-21T11:54:10 clone: get rid of head_info Since we no longer need to push data to callbacks, there's no need for this truct.
Carlos Martín Nieto cdb8a608 2014-05-21T11:51:33 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.
Carlos Martín Nieto d22db24f 2014-05-21T09:32:35 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.
Carlos Martín Nieto 04865aa0 2014-05-21T10:01:44 local transport: expose the symref data When using the local transport, we always have the symbolic information available, so fill it.
Carlos Martín Nieto 306475eb 2014-05-20T09:55:26 remote: expose the remote's symref mappings Add a symref_target field to git_remote_head to expose the symref mappings to the user.
Carlos Martín Nieto 8156835d 2014-05-20T09:29:39 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.
Albert Meltzer 60cdf495 2014-05-19T09:13:45 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.
Carlos Martín Nieto ac11219b 2014-05-19T16:54:19 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.
Russell Belfer c094197b 2014-05-19T15:05:39 Just don't CRLF filter if there are no CRs
Russell Belfer 16798d08 2014-05-19T14:57:09 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.
Vicent Marti 588a43af 2014-05-19T15:43:13 Merge pull request #2371 from martinwoodward/attrib_fnmatch Restore attributions for fnmatch
Martin Woodward 213a269a 2014-05-19T14:39:45 Restore attributions for fnmatch
Vicent Marti 124a45ea 2014-05-19T15:00:50 Merge pull request #2354 from libgit2/cmn/clone-into-mirror Allow mirror-clone via `git_clone_into()`
Carlos Martín Nieto 32332fcc 2014-05-19T14:15:40 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.
Carlos Martín Nieto 3c607685 2014-05-19T13:36:00 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.
Vicent Marti 52b597b6 2014-05-19T12:21:37 Merge pull request #2364 from libgit2/cmn/comment-char message: don't assume the comment char
Vicent Marti 138af337 2014-05-19T12:20:31 Merge pull request #2303 from jacquesg/mingw-lseek WIP: Windows fixes
Albert Meltzer 9c4feef9 2014-05-17T12:44:21 Fix warning on uninitialized variable.
Carlos Martín Nieto 49e369b2 2014-05-18T10:06:49 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.
Philip Kelley 4c9ffdff 2014-05-17T12:45:34 Fix printf format string from previous commit
Philip Kelley c6320bec 2014-05-17T12:19:32 print_binary_hunk: Treat types with respect
Philip Kelley bf6a5b61 2014-05-17T11:38:03 Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into development
Vicent Marti 191ff936 2014-05-17T02:37:13 Merge pull request #2362 from libgit2/rb/update-4k-to-8k Test and fix Git diff binary detection compatibility
Carlos Martín Nieto f7310540 2014-05-13T02:41:48 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.
Carlos Martín Nieto 0731a5b4 2014-05-14T19:12:48 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
Russell Belfer d0f00de4 2014-05-16T11:08:19 Increase binary detection len to 8k
Philip Kelley f0b820dd 2014-05-16T12:38:56 Win32: Supply _O_NOINHERIT when calling _wopen
Edward Lee bafaf790 2014-05-16T08:09:20 Fixed permissions on template directories.
Vicent Marti 228272ef 2014-05-16T11:56:37 Merge pull request #2313 from libgit2/cmn/remote-delete Remote deletion
Carlos Martín Nieto ec8a949a 2014-04-30T09:20:03 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.
Carlos Martín Nieto 649214be 2014-05-15T19:59:05 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.
Philip Kelley 4af0ef96 2014-05-15T11:09:49 Fix mutex init/free in config_file.c
Vicent Marti 7851e595 2014-05-14T16:05:23 Merge pull request #2351 from linquize/init-var Initialize local variable
Russell Belfer 2b52a0bf 2014-05-13T16:32:27 Increase use of config snapshots And decrease extra reload checks of config data.
Russell Belfer a37aa82e 2014-05-13T15:54:23 Some coverity inspired cleanups
Linquize b3f27c43 2014-05-13T21:08:50 Initialize local variable
Vicent Marti 03fcef18 2014-05-13T12:40:13 Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be Improve checks for ignore containment
Vicent Marti bcf9792f 2014-05-13T12:36:51 Merge pull request #2330 from libgit2/cmn/pack-unpack-loop Make pack object lookup use loops
Albert Meltzer 7c57cd97 2014-05-12T20:25:44 Win32 fix for #2300. The code doesn't use SSL and a test requires it.
Carlos Martín Nieto c968ce2c 2014-05-12T02:01:05 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.
Carlos Martín Nieto 15bcced2 2014-05-11T05:31:22 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.
Carlos Martín Nieto a3ffbf23 2014-05-11T03:50:34 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.
Russell Belfer df341926 2014-05-12T10:51:56 Merge pull request #2336 from libgit2/rb/unicode-branch-names Pass unconverted Unicode path data when iconv doesn't like it
Russell Belfer af567e88 2014-05-12T10:44:13 Merge pull request #2334 from libgit2/rb/fix-2333 Be more careful with user-supplied buffers
Russell Belfer ce3b71d9 2014-05-12T10:28:45 Don't scale diff stat when not needed
Russell Belfer b1914c36 2014-05-12T10:24:46 Minor fixes for warnings and error propagation
Russell Belfer 7bcced44 2014-05-12T10:15:30 Merge pull request #2300 from libgit2/cmn/match-host-tests Some improvements to the cert checking
Russell Belfer d2c4d1c6 2014-05-12T10:04:52 Merge pull request #2188 from libgit2/cmn/config-snapshot Configuration snapshotting
Carlos Martín Nieto 9dbd150f 2014-05-09T09:36:09 pack: simplify delta chain code The switch makes the loop somewhat unwieldy. Let's assume it's fine and perform the check when we're accessing the data. This makes our code look a lot more like git's.
Carlos Martín Nieto b2559f47 2014-05-08T17:14:59 pack: preallocate a 64-element chain Dependency chains are often large and require a few reallocations. Allocate a 64-element chain before doing anything else to avoid allocations during the loop. This value comes from the stack-allocated one git uses. We still allocate this on the heap, but it does help performance a little bit.
Carlos Martín Nieto e6d10c58 2014-05-08T16:24:54 pack: make sure not to leak the dep chain
Carlos Martín Nieto a332e91c 2014-05-06T23:37:28 pack: use a cache for delta bases when unpacking Bring back the use of the delta base cache for unpacking objects. When generating the delta chain, we stop when we find a delta base in the pack's cache and use that as the starting point.
Carlos Martín Nieto 2acdf4b8 2014-05-06T19:20:33 pack: unpack using a loop We currently make use of recursive function calls to unpack an object, resolving the deltas as we come back down the chain. This means that we have unbounded stack growth as we look up objects in a pack. This is now done in two steps: first we figure out what the dependency chain is by looking up the delta bases until we reach a non-delta object, pushing the information we need onto a stack and then we pop from that stack and apply the deltas until there are no more left. This version of the code does not make use of the delta base cache so it is slower than what's in the mainline. A later commit will reintroduce it.
Carlos Martín Nieto ae081739 2014-05-06T21:21:04 pack: do not repeat the same error message four times Repeating this error message makes it harder to find out where we actually are finding the error, and they don't really describe what we're trying to do.
Carlos Martín Nieto 86d5810b 2014-05-06T16:20:14 pack: remove misleading comment
Vicent Marti e18d5e52 2014-05-09T08:59:59 Merge pull request #2331 from libgit2/rb/dont-stop-diff-on-safecrlf Add filter options and ALLOW_UNSAFE
Russell Belfer 43a04135 2014-05-08T13:52:46 Pass unconverted data when iconv doesn't like it When using Iconv to convert unicode data and iconv doesn't like the source data (because it thinks that it's not actual UTF-8), instead of stopping the operation, just use the unconverted data. This will generally do the right thing on the filesystem, since that is the source of the non-UTF-8 path data anyhow. This adds some tests for creating and looking up branches with messy Unicode names. Also, this takes the helper function that was previously internal to `git_repository_init` and makes it into `git_path_does_fs_decompose_unicode` which is a useful in tests to understand what the expected results should be.
Carlos Martín Nieto 2dde1e0c 2014-05-08T22:31:59 indexer: avoid memory moves Our vector does a move of the rest of the array when we remove an item. Doing this repeatedly can be expensive, and we do this a lot in the indexer. Instead, set the value to NULL and skip those entries. perf reported around 30% of `index-pack` time was going into memmove. With this change, that goes away and we spent most of the time hashing and inflating data.
Russell Belfer 45c53eb6 2014-05-08T10:46:04 Use unsigned type for APIs with opt flag mask
Russell Belfer 1e4976cb 2014-05-08T10:17:14 Be more careful with user-supplied buffers This adds in missing calls to `git_buf_sanitize` and fixes a number of places where `git_buf` APIs could inadvertently write NUL terminator bytes into invalid buffers. This also changes the behavior of `git_buf_sanitize` to NUL terminate a buffer if it can and of `git_buf_shorten` to do nothing if it can. Adds tests of filtering code with zeroed (i.e. unsanitized) buffer which was previously triggering a segfault.
Carlos Martín Nieto ac99d86b 2014-05-07T11:34:32 repository: introduce a convenience config snapshot method Accessing the repository's config and immediately taking a snapshot of it is a common operation, so let's provide a convenience function for it.
Russell Belfer ed476c23 2014-05-06T16:11:03 Merge pull request #2329 from anuraggup/fix_git_shutdown Fix the issues in git_shutdown
Russell Belfer 5269008c 2014-05-06T16:01:49 Add filter options and ALLOW_UNSAFE Diff and status do not want core.safecrlf to actually raise an error regardless of the setting, so this extends the filter API with an additional options flags parameter and adds a flag so that filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating that unsafe filter application should be downgraded from a failure to a warning.
Russell Belfer 10511000 2014-05-06T14:03:58 Merge pull request #2324 from libgit2/cmn/file-in-objects-dir odb: ignore files in the objects dir
Anurag Gupta 0bf5430d 2014-05-06T13:33:47 Fix the issues in git_shutdown 1) Call to git_shutdown results in setting git__n_shutdown_callbacks to -1. Next call to git__on_shutdown results in ABW (Array Bound Write) for array git__shutdown_callbacks. In the current Implementation, git_atomic_dec is called git__n_shutdown_callbacks + 1 times. I have modified it to a for loop so that it is more readable. It would not set git__n_shutdown_callbacks to a negative number and reset the elements of git__shutdown_callbacks to NULL. 2) In function git_sysdir_get, shutdown function is registered only if git_sysdir__dirs_shutdown_set is set to 0. However, after this variable is set to 1, it is never reset to 0. If git_sysdir_global_init is called again from synchronized_threads_init it does not register shutdown function for this subsystem.
Russell Belfer f554611a 2014-05-06T12:41:26 Improve checks for ignore containment 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.
Carlos Martín Nieto 6e9afb97 2014-05-06T21:14:58 object: fix a brace The brace in the check for peel's return was surrounding the wrong thing, which made 'error' be set to 1 when there was an error instead of the error code.
Anurag Gupta 001befcd 2014-05-06T12:16:24 Fix the issues in git__on_shutdown
Carlos Martín Nieto ee311907 2014-05-05T16:04:14 odb: ignore files in the objects dir We assume that everything under GIT_DIR/objects/ is a directory. This is not necessarily the case if some process left a stray file in there. Check beforehand if we do have a directory and ignore the entry otherwise.
Vicent Marti 272b462d 2014-05-02T09:50:15 Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache Reduce excessive OID calculation for diff and stat
Russell Belfer 9862ef8e 2014-05-02T09:42:07 Merge pull request #2310 from libgit2/cmn/commit-create-safe commit: safer commit creation with reference update
Russell Belfer 0f603132 2014-05-01T14:47:33 Improve handling of fake home directory There are a few tests that set up a fake home directory and a fake GLOBAL search path so that we can test things in global ignore or attribute or config files. This cleans up that code to work more robustly even if there is a test failure. This also fixes some valgrind warnings where scanning search paths for separators could end up doing a little bit of sketchy data access when coming to the end of search list.
Russell Belfer bc91347b 2014-04-30T11:16:31 Fix remaining init_options inconsistencies There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
Russell Belfer 702efc89 2014-04-30T10:57:42 Make init_options fns use unsigned ints and macro Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).
Russell Belfer 9c8ed499 2014-04-29T15:05:58 Remove trace / add git_diff_perfdata struct + api
Russell Belfer 7a2e56a3 2014-04-29T14:30:15 Get rid of redundant git_diff_options_init fn Since git_diff_init_options was introduced, remove this old fn.
Russell Belfer b23b112d 2014-04-29T11:29:49 Add payloads, bitmaps to trace API This is a proposed adjustment to the trace APIs. This makes the trace levels into a bitmask so that they can be selectively enabled and adds a callback-level payload, plus a message-level payload. This makes it easier for me to a GIT_TRACE_PERF callbacks that are simply bypassed if the PERF level is not set.
Russell Belfer cd424ad5 2014-04-28T16:39:53 Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API This adds an option to refresh the stat cache while generating status. It also rips out the GIT_PERF stuff I had an makes use of the trace API to keep statistics about what happens during diff.