|
0ddfcb40
|
2013-05-02T18:06:14
|
|
Switch to index_version as "git_pack_file is ready" flag
We use p->index_map.data to check whether the struct has been set up
and all the information about the index is stored there. This variable
gets set up halfway through the setup process, however, and a thread
can come along and use fields that haven't been written to yet.
Crucially, pack_entry_find_offset() needs to read the index version
(which is written after index_map) to know the offset and stride
length to pass to sha1_entry_pos(). If these values are wrong,
assertions in it will fail, as it will be reading bogus data.
Make index_version the last field to be written and switch from using
p->index_map.data to p->index_version as "git_pack_file is ready" flag
as we can use it to know if every field has been written.
|
|
34bd5999
|
2013-05-02T17:14:05
|
|
Revert "Protect sha1_entry_pos call with mutex"
This reverts commit 8c535f3f6879c6796d8107d7eb80dd8b2105621b.
|
|
8c535f3f
|
2013-05-02T03:34:56
|
|
Protect sha1_entry_pos call with mutex
There is an occasional assertion failure in sha1_entry_pos from
pack_entry_find_index when running threaded. Holding the mutex
around the code that grabs the index_map data and processes it
makes this assertion failure go away.
|
|
81b7dec4
|
2013-05-02T03:06:34
|
|
Fix some compile warnings and trailing whitespace
|
|
9d2f841a
|
2013-05-02T03:03:54
|
|
Add extra locking around packfile open
We were still seeing a few issues in threaded access to packs.
This adds extra locks around the opening of the mwindow to
avoid a different race.
|
|
69c50f4c
|
2013-05-01T13:47:00
|
|
Merge pull request #1527 from ethomson/checkout_allow_empty_dirs
allow empty dirs to exist when doing checkout
|
|
8cddf9b8
|
2013-05-01T18:21:10
|
|
refdb: Properly load namespaces
|
|
0cc7d8df
|
2013-05-01T09:50:40
|
|
allow empty dirs to exist when doing checkout
|
|
e1807113
|
2013-05-01T15:31:23
|
|
merge: Warning noise
|
|
2ba55c1f
|
2013-05-01T15:20:08
|
|
refdb: Proper namespace root
|
|
758e50c5
|
2013-05-01T06:18:09
|
|
Merge pull request #1389 from ethomson/merge_trees
Merge trees
|
|
cfcdbc10
|
2013-05-01T03:03:17
|
|
Merge pull request #1523 from libgit2/vmg/namespaces
Namespace support
|
|
75d1c8c6
|
2013-04-30T17:33:11
|
|
move NAME and REUC extensions to sys/
|
|
0462fba5
|
2013-04-30T14:56:41
|
|
renames!
|
|
bec65a5e
|
2013-04-01T22:16:21
|
|
merge!
|
|
bade5194
|
2013-04-30T21:02:13
|
|
lol namespaces
|
|
5fa7e469
|
2013-04-30T04:13:39
|
|
Fix some formatting inconsistency
|
|
e26b14c0
|
2013-04-26T15:35:47
|
|
Update diff handling of untracked directories
When diff encounters an untracked directory, there was a shortcut
that it took which is not compatible with core git. This makes
the default behavior no longer take that shortcut and instead look
inside the untracked directory to see if there are any untracked
files within it. If there are not, then the directory is treated
as an ignore directory instead of an untracked directory. This
has implications for the git_status APIs.
|
|
fdb3034e
|
2013-04-25T14:57:13
|
|
Reorganize diff code into functions
In preparation for more changes to the internal diff logic, it
seemed wise to split the very large git_diff__from_iterators into
separate functions that handle the four main cases (unmatched old
item, unmatched new item, unmatched new directory, and matched
old and new items). Hopefully this will keep the logic easier to
follow even as more cases have to be added to this code.
|
|
7dcda3aa
|
2013-04-30T13:19:02
|
|
object: haha
|
|
0b726701
|
2013-04-30T13:13:38
|
|
object: Explicitly define helper API methods for all obj types
|
|
cd2ed9f0
|
2013-04-30T04:02:52
|
|
Merge pull request #1518 from arrbee/export-oid-comparison
Remove most inlines from the public API
|
|
d76fb20e
|
2013-04-30T03:29:48
|
|
Merge pull request #1520 from carlosmn/nth-refspec
Add refspec list accessors
|
|
0a1755c0
|
2013-04-30T03:15:45
|
|
Catch issue in config set with no config file
This prevents a segfault when setting a value in the config of a
repository that doesn't have a config file.
|
|
9c5d4b2e
|
2013-04-30T12:05:16
|
|
remote: fix a leak when dwim'ing refspecs
|
|
1ffd0806
|
2013-04-30T11:18:16
|
|
remote: add resfpec list accessors
Bring back a way of acessing the git_refspec* from a remote.
Closes #1514
|
|
8d39f2a7
|
2013-04-30T10:55:17
|
|
refspec: add direction accessor
|
|
203d5b0e
|
2013-04-29T18:20:58
|
|
Some cleanups
Removed useless prototype and renamed object typecast functions
declaration macro.
|
|
e4af0f00
|
2013-04-29T18:15:43
|
|
Add new src/oid.h
|
|
d7761102
|
2013-04-29T14:22:06
|
|
Standardize cast versions of git_object accessors
This removes the GIT_INLINE versions of the simple git_object
accessors and standardizes them with a helper macro in src/object.h
to build the function bodies.
|
|
b7f167da
|
2013-04-29T13:52:12
|
|
Make git_oid_cmp public and add git_oid__cmp
|
|
41578510
|
2013-04-29T13:30:31
|
|
Merge pull request #1511 from carlosmn/refspec-shorthand
dwim shorthand refspecs for fetch
|
|
c8a4e8a5
|
2013-04-29T11:14:56
|
|
don't use uninitialized struct stat in win32
|
|
aa8f0101
|
2013-04-29T08:59:46
|
|
Add git_oid_strcmp and use it for git_oid_streq
Add a new git_oid_strcmp that compares a string OID with a hex
oid for sort order, and then reimplement git_oid_streq using it.
This actually should speed up git_oid_streq because it only reads
as far into the string as it needs to, whereas previously it would
convert the whole string into an OID and then use git_oid_cmp.
|
|
8564a022
|
2013-04-29T08:51:24
|
|
Fix fragile git_oid_ncmp
git_oid_ncmp was making some assumptions about the length of
the data - this shifts the check to the top of the loop so it
will work more robustly, limits the max, and adds some tests
to verify the functionality.
|
|
0c72248b
|
2013-04-29T07:34:13
|
|
Introduce git_oid_compare, an exported oid cmp
|
|
51e4da6d
|
2013-04-29T01:49:40
|
|
push: don't send a packfile when only issuing delete commands
For update and create commands where all the objects are known to
exist in the remote, we must send an empty packfile. However, if all
we issue are delete commands, no packfile must be sent.
Take this into consideration for push.
|
|
d8488457
|
2013-04-28T16:26:55
|
|
remote: dwim the refspecs according to the remote's advertised refs
As git allows you to store shorthand refspecs in the configuration, we
need to do this ourselves.
|
|
528a4e24
|
2013-04-28T14:16:45
|
|
Parse shorthand refspecs as valid
Relax the ONELEVEL ref naming rules so the refspec parsing code can
ask for 'master' to be considered valid.
|
|
eb63fda2
|
2013-04-25T11:52:17
|
|
git_atomic_ssize for 64-bit atomics only on 64-bit platforms
|
|
879458e7
|
2013-04-24T15:52:33
|
|
repo: Add `git_repository__cleanup`
|
|
687db88f
|
2013-04-22T16:45:36
|
|
Make sure diff output is cleared on error
|
|
b1ff7004
|
2013-04-22T16:25:57
|
|
Improve diff config options handling
This makes diff use the cvar cache for config options where
possible, and also adds support for a number of other config
options to diff including "diff.context", "diff.ignoreSubmodules",
"diff.noprefix", "diff.mnemonicprefix", and "core.abbrev".
To make this natural, this involved a rearrangement of the code
that allocates the diff object vs. the code that initializes it
based on the combination of options passed in by the user and
read from the config.
This commit includes tests for most of these new options as well.
|
|
6be368bf
|
2013-04-22T16:24:53
|
|
Clear repo config cache when cfgs are set
This is a conservative change, but it seemed like the only safe
thing to do -- i.e. clear the cvar cache when a config gets set.
|
|
eac76c23
|
2013-04-22T14:27:36
|
|
Use config cache where possible
This converts many of the config lookups that are done around the
library to use the repository config cache. This was everything I
could find that wasn't part of diff (which requires a larger fix).
|
|
ab01cbd4
|
2013-04-22T14:24:12
|
|
Add configs to repo config cache
This adds a bunch of additional config values to the repository
config value cache and makes it easier to add a simple boolean
config without creating enum values for each possible setting.
Also, this fixes a bug in git_config_refresh where the config
cache was not being cleared which could lead to potential
incorrect values.
The work to start using the new cached configs will come in the
next couple of commits...
|
|
608d0466
|
2013-04-22T13:51:35
|
|
Make tree to tree diffs case sensitive
When case insensitive tree iterators were added, we started reading
the case sensitivity of the index to decide if the tree should be
case sensitive. This is good for index-to-tree comparisons, but
for tree-to-tree comparisons, we should really default to doing a
case sensitive comparison unless the user really wants otherwise.
|
|
a5df71c1
|
2013-04-19T22:36:01
|
|
Support diff.context config
|
|
bd0a07f4
|
2013-04-23T12:28:59
|
|
Clone: replace fetch spec with custom value
|
|
7915e6cc
|
2013-04-23T11:48:12
|
|
Merge pull request #1498 from libgit2/vmg/atomic64
64 bit atomic operations and shared cache memory usage
|
|
a2378ae4
|
2013-04-23T20:42:29
|
|
opts: Add getter for cached memory
|
|
0b90366c
|
2013-04-23T12:27:38
|
|
Fixes indentation
|
|
f0e37a8b
|
2013-04-23T12:22:29
|
|
Added function to insert commit into pack
|
|
a5de9044
|
2013-04-23T02:24:44
|
|
refs: Better error name
|
|
920cbc98
|
2013-04-22T17:31:47
|
|
cache: More aggressive default
|
|
a14163a7
|
2013-04-22T17:30:49
|
|
cache: Shared meter for memory usage
|
|
f9774eea
|
2013-04-22T17:22:31
|
|
atomic: Add an atomic type for 64-bit operations
|
|
05b17964
|
2013-04-21T19:26:35
|
|
Make refcounting atomic
|
|
d8771592
|
2013-04-22T17:04:52
|
|
cache: Max cache size, and evict when the cache fills up
|
|
5d2d21e5
|
2013-04-16T15:00:43
|
|
Consolidate packfile allocation further
Rename git_packfile_check to git_packfile_alloc since it is now
being used more in that capacity. Fix the various places that use
it. Consolidate some repeated code in odb_pack.c related to the
allocation of a new pack_backend.
|
|
38eef611
|
2013-04-16T14:19:27
|
|
Make indexer use shared packfile open code
The indexer was creating a packfile object separately from the
code in pack.c which was a problem since I put a call to
git_mutex_init into just pack.c. This commit updates the pack
function for creating a new pack object (i.e. git_packfile_check())
so that it can be used in both places and then makes indexer.c
use the shared initialization routine.
There are also a few minor formatting and warning message fixes.
|
|
c6289186
|
2013-04-15T16:31:04
|
|
Fixes for Windows cas/threading stuff
|
|
e976b56d
|
2013-04-15T14:27:53
|
|
Add git__compare_and_swap and use it
This removes the lock from the repository object and changes the
internals to use the new atomic git__compare_and_swap to update
the _odb, _config, _index, and _refdb variables in a threadsafe
manner.
|
|
53607868
|
2013-04-15T00:09:03
|
|
Further threading fixes
This builds on the earlier thread safety work to make it so that
setting the odb, index, refdb, or config for a repository is done
in a threadsafe manner with minimized locking time. This is done
by adding a lock to the repository object and using it to guard
the assignment of the above listed pointers. The lock is only
held to assign the pointer value.
This also contains some minor fixes to the other work with pack
files to reduce the time that locks are being held to and fix an
apparently memory leak.
|
|
116bbdf0
|
2013-04-16T12:08:21
|
|
clean up tree pointer casting
|
|
3f27127d
|
2013-04-16T11:51:02
|
|
Simplify object table parse functions
This unifies the object parse functions into one signature that
takes an odb_object.
|
|
78606263
|
2013-04-15T00:05:44
|
|
Add callback to git_objects_table
This adds create and free callback to the git_objects_table so
that more of the creation and destruction of objects can be table
driven instead of using switch statements. This also makes the
semantics of certain object creation functions consistent so that
we can make better use of function pointers. This also fixes a
theoretical error case where an object allocation fails and we
end up storing NULL into the cache.
|
|
24c70804
|
2013-04-12T12:59:38
|
|
Add mutex around mapping and unmapping pack files
When I was writing threading tests for the new cache, the main
error I kept running into was a pack file having it's content
unmapped underneath the running thread. This adds a lock around
the routines that map and unmap the pack data so that threads can
effectively reload the data when they need it.
This also required reworking the error handling paths in a couple
places in the code which I tried to make consistent.
|
|
b12b72ea
|
2013-04-12T12:44:51
|
|
Add range checking around cache opts
Add a git_cache_set_max_object_size method that does more checking
around setting the max object size. Also add a git_cache_size to
read the number of objects currently in the cache. This makes it
easier to write tests.
|
|
badd85a6
|
2013-04-10T17:10:17
|
|
Use git_odb_object_data/_size whereever possible
This uses the odb object accessors so we can change the internals
more easily...
|
|
ee12272d
|
2013-04-05T22:48:39
|
|
Global option setters
|
|
e183e375
|
2013-04-05T22:38:14
|
|
Clear the cache when there are too many items to expire
|
|
d9d423e4
|
2013-04-03T23:53:32
|
|
Some stats
|
|
064236ca
|
2013-04-03T23:39:42
|
|
Per-object max size
|
|
cf7850a4
|
2013-04-03T23:09:54
|
|
Duplicated type object
|
|
8842c75f
|
2013-04-03T22:30:07
|
|
What has science done.
|
|
c4e91d45
|
2013-04-03T20:57:30
|
|
Random eviction
|
|
6b90e244
|
2013-04-01T19:53:49
|
|
Per-object filtering
|
|
5df18424
|
2013-04-01T19:38:23
|
|
lol this worked first try wtf
|
|
a92dd316
|
2013-04-22T07:44:52
|
|
Merge pull request #1489 from libgit2/vmg/dupe-odb-backends
Do not allow duplicate ODB backends
|
|
a472f887
|
2013-04-22T07:44:32
|
|
Merge pull request #1493 from carlosmn/remotes
Revamp the refspec handling
|
|
0edad3cc
|
2013-04-22T16:41:56
|
|
Merge branch 'development' into vmg/dupe-odb-backends
Conflicts:
src/odb.c
|
|
4ef2c79c
|
2013-04-22T16:37:40
|
|
odb: Disable inode checks for Win32
|
|
f063a758
|
2013-04-22T04:06:11
|
|
Merge pull request #1485 from libgit2/include-git2-sys
Create include/git2/sys and move backend APIs there
|
|
0d4a5b13
|
2013-04-22T00:13:35
|
|
Add missing prototype for p_realpath().
|
|
21ca0451
|
2013-04-21T12:52:17
|
|
Move git_reference__alloc to include/git2/sys
Create a new include/git2/sys/refs.h and move the reference alloc
functions there. Also fix some documentation issues and some
minor code cleanups.
|
|
4dcd8780
|
2013-04-19T17:17:44
|
|
Move refdb_backend to include/git2/sys
This moves most of the refdb stuff over to the include/git2/sys
directory, with some minor shifts in function organization.
While I was making the necessary updates, I also removed the
trailing whitespace in a few files that I modified just because I
was there and it was bugging me.
|
|
9233b3de
|
2013-04-19T13:17:29
|
|
Move git_commit_create_from_oids into sys/commit.h
Actually this renames git_commit_create_oid to
git_commit_create_from_oids and moves the API declaration to
include/git2/sys/commit.h since it is a dangerous API for general
use (because it doesn't check that the OID list items actually
refer to real objects).
|
|
92550398
|
2013-01-29T09:53:23
|
|
Added git_commit_create_oid
|
|
1384b688
|
2013-04-19T13:00:12
|
|
Move some low-level repo fns to include/git2/sys
|
|
7cc3c920
|
2013-01-29T07:48:36
|
|
Added git_repository_new function
|
|
83cc70d9
|
2013-04-19T12:48:33
|
|
Move odb_backend implementors stuff into git2/sys
This moves some of the odb_backend stuff that is related to the
internals of an odb_backend implementation into include/git2/sys.
Some of the stuff related to streaming I left in include/git2
because it seemed like it would be reasonably needed by a normal
user who wanted to stream objects into and out of the ODB.
Also, I added APIs for traversing the list of backends so that
some of the tests would not need to access ODB internals.
|
|
83041c71
|
2013-04-19T11:52:04
|
|
Move git_config_backend to include/git2/sys
Moving backend implementor objects into include/git2/sys so the
APIs can be isolated from the ones that normal libgit2 users
would be likely to use.
|
|
1be680c4
|
2013-04-20T19:13:47
|
|
refspec: unify the string and parsed data
It used to be separate as an attempt to make the querying easier, but
it didn't work out that way, so put all the data together.
Add git_refspec_string() as well to get the original string, which is
now stored alongside the independent parts.
|
|
bc6374ea
|
2013-04-20T18:49:11
|
|
remote: allow querying for refspecs
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.
Use this instead of the vector index hacks in the tests.
|
|
4330ab26
|
2013-04-20T04:43:28
|
|
remote: handle multiple refspecs
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.
Let the remotes and internal code know about multiple remotes and get
the tests passing with them.
Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
|
|
e5a27f03
|
2013-04-20T15:25:39
|
|
config: allow setting multivars when none exist yet
Adding a multivar when there are no variables with that name set
should set the variable instead of failing.
|
|
4e4eab52
|
2013-04-19T18:19:53
|
|
alloc doesn't take a refdb; git_refdb_free nicely in the tests
|
|
a29c6b5f
|
2013-04-19T23:51:18
|
|
odb: Do not allow duplicate on-disk backends
|
|
1af80a67
|
2013-04-18T16:13:52
|
|
Fix workdir iterator leak
When attempting to create a workdir iterator for a bare repo,
don't leak the iterator structure.
|