|
517341c5
|
2014-05-23T22:41:35
|
|
Address style concerns in setting mkdir/copy flags.
|
|
bafaf790
|
2014-05-16T08:09:20
|
|
Fixed permissions on template directories.
|
|
228272ef
|
2014-05-16T11:56:37
|
|
Merge pull request #2313 from libgit2/cmn/remote-delete
Remote deletion
|
|
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.
|
|
8e1b5a8d
|
2014-05-15T15:31:13
|
|
Merge pull request #2357 from libgit2/cmn/pack-cache-init
pack: init the cache on packfile alloc
|
|
88b1b36d
|
2014-05-15T20:25:54
|
|
Merge pull request #2356 from libgit2/rb/restore-search-paths
Better global search path sandboxing in tests
|
|
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.
|
|
8487e237
|
2014-05-15T10:56:28
|
|
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.
|
|
4af0ef96
|
2014-05-15T11:09:49
|
|
Fix mutex init/free in config_file.c
|
|
7851e595
|
2014-05-14T16:05:23
|
|
Merge pull request #2351 from linquize/init-var
Initialize local variable
|
|
2bcc1afd
|
2014-05-14T12:20:24
|
|
Merge pull request #2349 from libgit2/rb/coverity-fixes
Increase config snapshot usage
|
|
a8af3e02
|
2014-05-14T12:18:57
|
|
Merge pull request #2348 from stewid/add-link-R-bindings
Add R bindings to the README
|
|
2b52a0bf
|
2014-05-13T16:32:27
|
|
Increase use of config snapshots
And decrease extra reload checks of config data.
|
|
a37aa82e
|
2014-05-13T15:54:23
|
|
Some coverity inspired cleanups
|
|
562516ec
|
2014-05-13T22:43:59
|
|
Add R bindings to the README
|
|
b3f27c43
|
2014-05-13T21:08:50
|
|
Initialize local variable
|
|
03fcef18
|
2014-05-13T12:40:13
|
|
Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be
Improve checks for ignore containment
|
|
bcf9792f
|
2014-05-13T12:36:51
|
|
Merge pull request #2330 from libgit2/cmn/pack-unpack-loop
Make pack object lookup use loops
|
|
e1619626
|
2014-05-13T12:35:56
|
|
Merge pull request #2346 from kitbellew/fix2300
Minor fix for previously merged netops code.
|
|
7c57cd97
|
2014-05-12T20:25:44
|
|
Win32 fix for #2300.
The code doesn't use SSL and a test requires it.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
af567e88
|
2014-05-12T10:44:13
|
|
Merge pull request #2334 from libgit2/rb/fix-2333
Be more careful with user-supplied buffers
|
|
ce3b71d9
|
2014-05-12T10:28:45
|
|
Don't scale diff stat when not needed
|
|
b1914c36
|
2014-05-12T10:24:46
|
|
Minor fixes for warnings and error propagation
|
|
7bcced44
|
2014-05-12T10:15:30
|
|
Merge pull request #2300 from libgit2/cmn/match-host-tests
Some improvements to the cert checking
|
|
d2c4d1c6
|
2014-05-12T10:04:52
|
|
Merge pull request #2188 from libgit2/cmn/config-snapshot
Configuration snapshotting
|
|
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.
|
|
e6d10c58
|
2014-05-08T16:24:54
|
|
pack: make sure not to leak the dep chain
|
|
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.
|
|
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.
|
|
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.
|
|
86d5810b
|
2014-05-06T16:20:14
|
|
pack: remove misleading comment
|
|
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.
|
|
e18d5e52
|
2014-05-09T08:59:59
|
|
Merge pull request #2331 from libgit2/rb/dont-stop-diff-on-safecrlf
Add filter options and ALLOW_UNSAFE
|
|
bb45e390
|
2014-05-08T15:01:07
|
|
Disable threads::refdb::edit_while_iterate test
It seems that with the various recent changes to reference updating
and reflog writing, that the thread safety of refdb updates has
been reduced (either that or it was never thread safe and the
window for error has increased). Either way, this test is now
sometimes segfaulting which is no good, so let's disable the test
for now. We don't really make any public promises about thread
safety for this type of operation, so I think this is acceptable,
at least in the short term.
|
|
8a2ef218
|
2014-05-08T14:48:27
|
|
Don't always test composed-insensitive lookups
Only on a filesystem that is composed/decomposed insensitive,
should be testing that a branch can be looked up by the opposite
form and still work correctly.
|
|
be20ac5a
|
2014-05-08T14:33:37
|
|
Allow cl_repo_get_bool to work with missing key
One of the test helpers provides a quick way for looking up a
boolean key. But if the key way missing completely, the check
would actually raise an error. Given the way we use this helper,
if the key is missing, this should just return false, I think.
|
|
4df53a64
|
2014-05-08T23:16:21
|
|
Merge pull request #2335 from libgit2/cmn/indexer-vector-handling
indexer: avoid memory moves
|
|
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.
|
|
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.
|
|
5ebe18b7
|
2014-05-08T13:29:09
|
|
Merge pull request #2332 from libgit2/peff/iconv
iconv debugging aids
|
|
56ec2256
|
2014-05-08T01:06:38
|
|
examples: add a basic for-each-ref example
This is quite close to running "git for-each-ref" except:
1. It does not take any formatting or selection options at
all.
2. The output is not sorted.
I wrote it to look at debugging some issues with ref
iteration, but there's no reason it can't live on as an
example command.
|
|
6bcb0987
|
2014-05-08T00:35:56
|
|
cmake: s/ICONV/Iconv/ in FIND_PACKAGE
The cmake module we provide is in the file FindIconv.cmake,
so we must match the case correctly. It happens to work in
practice because we only turn on ICONV on Darwin, and people
generally have case-insensitive filesystems there.
Note that we only need to update the package name here. The
package itself still sets the all-uppercase ICONV_FOUND
flag, so we continue to use uppercase in the rest of cmake.
|
|
45c53eb6
|
2014-05-08T10:46:04
|
|
Use unsigned type for APIs with opt flag mask
|
|
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.
|
|
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.
|
|
ed476c23
|
2014-05-06T16:11:03
|
|
Merge pull request #2329 from anuraggup/fix_git_shutdown
Fix the issues in git_shutdown
|
|
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.
|
|
10511000
|
2014-05-06T14:03:58
|
|
Merge pull request #2324 from libgit2/cmn/file-in-objects-dir
odb: ignore files in the objects dir
|
|
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.
|
|
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.
|
|
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.
|
|
001befcd
|
2014-05-06T12:16:24
|
|
Fix the issues in git__on_shutdown
|
|
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.
|
|
d2c16e9a
|
2014-05-02T15:15:43
|
|
Doc fixes
|
|
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
|
|
9862ef8e
|
2014-05-02T09:42:07
|
|
Merge pull request #2310 from libgit2/cmn/commit-create-safe
commit: safer commit creation with reference update
|
|
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).
|
|
9c8ed499
|
2014-04-29T15:05:58
|
|
Remove trace / add git_diff_perfdata struct + api
|
|
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.
|
|
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.
|
|
225aab5d
|
2014-04-28T16:47:39
|
|
Don't use trace if GIT_TRACE not defined
|
|
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.
|
|
94fb4aad
|
2014-04-28T14:48:41
|
|
Add diff option to update index stat cache
When diff is scanning the working directory, if it finds a file
where it is not sure if the index entry matches the working dir,
it will recalculate the OID (which is pretty expensive). This
adds a new flag to diff so that if the OID calculation finds that
the file actually has not changed (i.e. just the modified time was
altered or such), then it will refresh the stat cache in the index
so that future calls to diff will not have to check the oid again.
|
|
0fc8e1f6
|
2014-04-28T14:34:55
|
|
Lay groundwork for updating stat cache in diff
This reorganized the diff OID calculation to make it easier to
correctly update the stat cache during a diff once the flags to
do so are enabled.
This includes marking the path of a git_index_entry as const so
we can make a "fake" git_index_entry with a "const char *" path
and not get warnings. I was a little surprised at how unobtrusive
this change was, but I think it's probably a good thing.
|
|
99dfa470
|
2014-05-01T15:12:12
|
|
Some further sandboxing cleanups to tests
Trying to find other issues where tests may not clean up quite
properly when they are through...
|
|
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.
|
|
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.
|
|
8ef4e11a
|
2014-04-28T14:16:26
|
|
Skip diff oid calc when size definitely changed
When we think the stat cache in the index seems valid and the size
or mode of a file has definitely changed, then don't bother trying
to recalculate the OID of the workdir bits to confirm that it is
modified - just accept that it is modified.
This can result in files that show as modified with no actual diff,
but the behavior actually appears to match Git on the command line.
This also includes a minor optimization to not perform a submodule
lookup on the ".git" directory itself.
|
|
240f4af3
|
2014-04-28T14:04:29
|
|
Add build option for diff internal statistics
|
|
6a1ca96e
|
2014-05-02T17:14:04
|
|
Temporary fix for Travis CI builds
See https://github.com/libgit2/libgit2/pull/2321#issuecomment-42039673
We may rollback once we found something more reliable
|
|
89e9c167
|
2014-05-02T03:37:40
|
|
Merge pull request #2318 from linquize/sleep
Make examples/status.c compile on Windows
|
|
644592bc
|
2014-05-02T03:36:22
|
|
Merge pull request #2320 from libgit2/rb/fix-starstar-again
Make ** pattern eat trailing slash
|
|
d19b2f9f
|
2014-05-01T12:46:46
|
|
Make ** pattern eat trailing slash
This allows "foo/**/*.html" to match "foo/file.html"
|
|
d0420fc6
|
2014-05-01T22:39:35
|
|
Make examples/status.c compile on Windows
|
|
9d878fc4
|
2014-05-01T01:23:10
|
|
Merge pull request #2304 from jacquesg/solaris
Solaris!
|
|
183aa4f8
|
2014-04-30T17:46:53
|
|
Check for NULL before passing it to vsnprintf
|
|
6b05240c
|
2014-04-27T19:44:20
|
|
strcasecmp is in <strings.h>
|
|
98b8fcff
|
2014-04-29T20:45:02
|
|
Build regex.c for Solaris. Added required defines for Solaris
|
|
5cdac19c
|
2014-04-30T08:29:14
|
|
remote: move branch upstream deletion to use an iterator
This should make it more readable and allocate a bunch fewer strings.
|
|
c522bed0
|
2014-04-30T05:45:31
|
|
Merge pull request #2314 from libgit2/cmn/known-libs
Assorted CMake fixups
|
|
739040e6
|
2014-04-30T05:34:33
|
|
Merge pull request #2315 from jacquesg/qsort-cygwin
cygwin also doesn't have qsort_r
|
|
90a4340a
|
2014-04-30T11:47:58
|
|
cygwin also doesn't have qsort_r
|
|
039e354b
|
2014-04-30T11:57:54
|
|
ciscript: don't use an empty string as a number
An empty string is not a valid number, and some shells complain.
Check instead if $COVERITY is non-empty, which is a common convention
and what we're doing anyway.
|
|
40e48ea4
|
2013-11-15T15:36:37
|
|
remote: Introduce git_remote_delete()
|
|
891b0277
|
2014-04-30T11:20:51
|
|
refs: document _next_name()
If it's not documented, it doesn't show up in the docs (and we really
should document, anyway).
|
|
f5fc63bc
|
2014-04-30T10:55:58
|
|
Don't exclude libssh2 from MinGW
It reportedly works. It does not however work when cross-compiling on
Travis, so let's disable it there.
This fixes #2311.
|
|
096ac799
|
2014-02-13T22:38:23
|
|
Workaround missing .pc files on FreeBSD
This fixes #2118
|
|
04739e9f
|
2014-04-30T10:15:44
|
|
Unquiet CMake output
The point of this phase is to know what we have and not. Show the user a
clear indication of what we have.
|
|
48ebea66
|
2013-01-07T00:20:13
|
|
tests: Introduce count_config_entries_match() helper
|
|
217c029b
|
2014-04-09T14:08:22
|
|
commit: safer commit creation with reference update
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.
Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.
Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
|
|
892778ee
|
2014-04-29T05:02:38
|
|
Merge pull request #2309 from jacquesg/midnightbsd
MidnightBSD may also not have strnlen
|
|
36a61518
|
2014-04-29T13:28:16
|
|
MidnightBSD may also not have strnlen
|
|
041336e6
|
2014-04-28T07:36:27
|
|
Merge pull request #2306 from odcinek/development_cmake
Make the build CMake 2.6 compatible
|
|
7f0de93a
|
2014-04-28T15:24:36
|
|
Make the build CMake 2.6 compatible
|
|
ec771058
|
2014-04-27T03:57:53
|
|
Merge pull request #2301 from libgit2/cmn/pack-objects-memory
Keep the deflate buffer from ballooning up
|
|
38d338b2
|
2014-04-26T18:15:39
|
|
pack-objects: always write out the status in write_one()
Make sure we set the output parameter to a value.
|