|
d828f118
|
2013-03-25T18:16:02
|
|
don't stat until the file is written
|
|
f17951d6
|
2013-03-25T14:42:53
|
|
Merge pull request #1431 from libgit2/autocrlf-fixes
Fix crlf handling, particularly when autocrlf=true
|
|
3658e81e
|
2013-03-25T14:20:07
|
|
Move crlf conversion into buf_text
This adds crlf/lf conversion functions into buf_text with more
efficient implementations that bypass the high level buffer
functions. They attempt to minimize the number of reallocations
done and they directly write the buffer data as needed if they
know that there is enough memory allocated to memcpy data.
Tests are added for these new functions. The crlf.c code is
updated to use the new functions.
Removed the include of buf_text.h from filter.h and just include
it more narrowly in the places that need it.
|
|
050ab995
|
2013-03-25T14:13:53
|
|
Fix up checkout file contents checks
This fixes of the file contents checks in checkout to give
slightly better error messages by directly calling the underlying
clar assertions so the file and line number of the top level call
can be reported correctly, and renames the helpers to not start
with "test_" since that is kind of reserved by clar.
This also enables some of the CRLF tests on all platforms that
were previously Windows only (by pushing a check of the native
line endings into the test body).
|
|
9733e80c
|
2013-03-22T10:44:45
|
|
Add has_cr_in_index check to CRLF filter
This adds a check to the drop_crlf filter path to check it the
file in the index already has a CR in it, in which case this will
not drop the CRs from the workdir file contents.
This uncovered a "bug" in `git_blob_create_fromworkdir` where the
full path to the file was passed to look up the attributes instead
of the relative path from the working directory root. This meant
that the check in the index for a pre-existing entry of the same
name was failing.
|
|
4a15ea86
|
2013-03-21T14:02:25
|
|
don't convert CRLF to CRCRLF
|
|
1098cfae
|
2013-03-22T14:52:29
|
|
Test fixes and cleanup
This fixes some places where the new tests were leaving the test
area in a bad state or were freeing data they should not free.
It also removes code that is extraneous to the core issue and
fixes an invalid SHA being looked up in one of the tests (which
was failing, but for the wrong reason).
|
|
b8acb775
|
2013-03-07T22:15:40
|
|
Added some tests for issue #1397
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
13640d1b
|
2013-03-25T21:39:11
|
|
oid: Do not parse OIDs longer than 40
|
|
1f107478
|
2013-03-25T13:26:50
|
|
Merge pull request #1428 from xavier-l/nul-terminated-oid
Nul terminated oid
|
|
c2ea65ee
|
2013-03-25T21:22:57
|
|
clar: Disable online tests. By now.
|
|
f7110e6c
|
2013-03-25T10:11:32
|
|
Merge pull request #1427 from Lionelon/development
Fix link issue in network examples
|
|
c5b72fa2
|
2013-03-25T10:09:03
|
|
Merge pull request #1435 from mcanes/development
Remove GIT_SUCCESS from documentation
|
|
c2186230
|
2013-03-24T12:34:00
|
|
Remove GIT_SUCCESS from documentation
|
|
3f21a23c
|
2013-03-23T12:10:23
|
|
Merge pull request #1432 from arrbee/update-clar
Update clar and some test helpers clean up
|
|
1323c6d1
|
2013-03-22T14:27:56
|
|
Add cl_repo_set_bool and cleanup tests
This adds a helper function for the cases where you want to
quickly set a single boolean config value for a repository.
This allowed me to remove a lot of code.
|
|
3ba01362
|
2013-03-20T11:46:03
|
|
Update cl_assert_equal_sz to be nicer
This makes the size_t comparison test nicer (assuming that the
values are actually not using the full length), and converts
some cases that were using it for pointer comparison to use the
macro that is designed for pointer comparison.
|
|
7202ec29
|
2013-03-20T11:47:34
|
|
Update to latest Clar
|
|
33a59401
|
2013-03-22T20:22:39
|
|
graph: make the ahead-behind docs clearer
Explain it in local-upstream branch terms so it's easier to grasp than
with the `one` and `two` naming from the merge-base code.
|
|
b3c17483
|
2013-03-21T14:50:28
|
|
Clarified string value
|
|
1e7b7523
|
2013-03-21T12:30:08
|
|
git_oid_fromstrn already sets a maximum on the length of the string
|
|
7e527ca7
|
2013-03-21T12:16:31
|
|
Added test case for new function
|
|
0c8efb38
|
2013-03-21T11:59:01
|
|
Added an oid function that accepts nul-terminated strings
|
|
e2886f1e
|
2013-03-20T21:13:43
|
|
Fix link issue in network examples
|
|
7dbf4039
|
2013-03-19T11:47:23
|
|
Merge pull request #1423 from arrbee/submodule-status-errors
Three submodule status bug fixes
|
|
0b0ecbec
|
2013-03-19T17:42:10
|
|
clone: fix param comment
|
|
65025cb8
|
2013-03-18T17:24:13
|
|
Three submodule status bug fixes
1. Fix sort order problem with submodules where "mod" was sorting
after "mod-plus" because they were being sorted as "mod/" and
"mod-plus/". This involved pushing the "contains a .git entry"
test significantly lower in the stack.
2. Reinstate behavior that a directory which contains a .git entry
will be treated as a submodule during iteration even if it is
not yet added to the .gitmodules.
3. Now that any directory containing .git is reported as submodule,
we have to be more careful checking for GIT_EEXISTS when we
do a submodule lookup, because that is the error code that is
returned by git_submodule_lookup when you try to look up a
directory containing .git that has no record in gitmodules or
the index.
|
|
5b27bf7e
|
2013-03-18T16:17:14
|
|
Merge pull request #1417 from arrbee/opts-for-paths
Implement opts interface for global/system file search paths
|
|
32460251
|
2013-03-18T15:54:35
|
|
Fixes and cleanups
Get rid of some dead code, tighten things up a bit, and fix a bug
with core::env test.
|
|
41954a49
|
2013-03-18T14:19:35
|
|
Switch search paths to classic delimited strings
This switches the APIs for setting and getting the global/system
search paths from using git_strarray to using a simple string with
GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment
PATH variable would contain. This makes it simpler to get and set
the value.
I also added code to expand "$PATH" when setting a new value to
embed the old value of the path. This means that I no longer
require separate actions to PREPEND to the value.
|
|
50eb8520
|
2013-03-18T14:05:31
|
|
Merge pull request #1420 from KindDragon/static-code-analyzer-warnings
Several warnings detected by static code analyzer fixed
|
|
677dce8a
|
2013-03-18T14:00:09
|
|
Merge pull request #1080 from carlosmn/config-set-null
Failing config related test
|
|
15a63e21
|
2013-03-18T13:55:18
|
|
Merge pull request #1418 from QbProg/qb/cmake-msvc
MSVC cmake improvements
|
|
10c06114
|
2013-03-17T04:46:46
|
|
Several warnings detected by static code analyzer fixed
Implicit type conversion argument of function to size_t type
Suspicious sequence of types castings: size_t -> int -> size_t
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'
Unsigned type is never < 0
|
|
d66a7c06
|
2013-03-16T17:48:24
|
|
Fix for a cmake bug when using MSVC + Win64 + static libraries
(see http://public.kitware.com/Bug/view.php?id=11240)
|
|
08f32085
|
2013-03-16T17:38:27
|
|
Adds an option to select the CRT link mode ( static or dynamic ).
This is useful when linking libgit2 statically, as the setting must match the linking program's one.
|
|
5540d947
|
2013-03-15T16:39:00
|
|
Implement global/system file search paths
The goal of this work is to expose the search logic for "global",
"system", and "xdg" files through the git_libgit2_opts() interface.
Behind the scenes, I changed the logic for finding files to have a
notion of a git_strarray that represents a search path and to store
a separate search path for each of the three tiers of config file.
For each tier, I implemented a function to initialize it to default
values (generally based on environment variables), and then general
interfaces to get it, set it, reset it, and prepend new directories
to it.
Next, I exposed these interfaces through the git_libgit2_opts
interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants
for the user to control which search path they were modifying.
There are alternative designs for the opts interface / argument
ordering, so I'm putting this phase out for discussion.
Additionally, I ended up doing a little bit of clean up regarding
attr.h and attr_file.h, adding a new attrcache.h so the other two
files wouldn't have to be included in so many places.
|
|
a5f61384
|
2013-03-15T12:24:20
|
|
odb_pack: Unused functions
|
|
f16fb099
|
2013-03-15T12:11:02
|
|
pool: Internal struct name
|
|
5b229e20
|
2013-03-15T04:06:31
|
|
Merge pull request #1413 from arrbee/more-iterator-refactor
Further tree_iterator refactoring
|
|
e953c160
|
2013-03-14T16:11:31
|
|
Merge pull request #1414 from arrbee/more-build-warning-fixes
Fix various build warnings
|
|
55e0f53d
|
2013-03-14T15:09:29
|
|
Fix various build warnings
This fixes various build warnings on Mac and Windows (64-bit).
|
|
14bedad9
|
2013-03-14T15:08:04
|
|
Added pool freelist struct for readability
This adds a git_pool_freelist_item struct that makes it a little
easier to follow what's going on with the pool free list block
management code. It is functionally neutral.
|
|
d85296ab
|
2013-03-14T13:50:54
|
|
Fix valgrind issues (and mmap fallback for diff)
This fixes a number of issues identified by valgrind - mostly
missed free calls. Inside valgrind, mmap() may fail which causes
some of the diff tests to fail. This adds a fallback code path
to diff_output.c:get_workdir_content() where is the mmap() fails
the code will now try to read the file data directly into allocated
memory (which is what it would do if the data needed to be filtered
anyhow).
|
|
0c468633
|
2013-03-14T13:40:15
|
|
Improved tree iterator internals
This updates the tree iterator internals to be more efficient.
The tree_iterator_entry objects are now kept as pointers that are
allocated from a git_pool, so that we may use git__tsort_r for
sorting (which is better than qsort, given that the tree is
likely mostly ordered already).
Those tree_iterator_entry objects now keep direct pointers to the
data they refer to instead of keeping indirect index values. This
simplifies a lot of the data structure traversal code.
This also adds bsearch to find the start item position for range-
limited tree iterators, and is more explicit about using
git_path_cmp instead of reimplementing it. The git_path_cmp
changed a bit to make it easier for tree_iterators to use it (but
it was barely being used previously, so not a big deal).
This adds a git_pool_free_array function that efficiently frees a
list of pool allocated pointers (which the tree_iterator keeps).
Also, added new tests for the git_pool free list functionality
that was not previously being tested (or used).
|
|
6950dca4
|
2013-03-13T15:50:13
|
|
Merge pull request #1411 from arrbee/workdir-iterator-depth-limit-bug
Fix workdir iterator bugs
|
|
bbb13646
|
2013-03-13T14:59:51
|
|
Fix workdir iterator bugs
This fixes two bugs with the workdir iterator depth check: first
that the depth was not being decremented and second that empty
directories were counting against the depth even though a frame
was not being created for them.
This also fixes a bug with the ENOTFOUND return code for workdir
iterators when you attempt to advance_into an empty directory.
Actually, that works correctly, but it was incorrectly being
propogated into regular advance() calls in some circumstances.
Added new tests for the above that create a huge hierarchy on
the fly and try using the workdir iterator to traverse it.
|
|
ad003763
|
2013-03-12T20:36:35
|
|
MSVC: What could possibly be the size of a void*?
|
|
c6d7d877
|
2013-03-12T12:32:12
|
|
Merge pull request #1410 from phkelley/push_sideband
Advertise and support side-band-64k when calling receive-pack
|
|
f5898324
|
2013-03-12T15:31:14
|
|
Style: Reverse lhs and rhs of == comparisons
|
|
b8c32580
|
2013-03-12T15:19:32
|
|
Advertise and support side-band-64k when calling receive-pack
|
|
1ac10aae
|
2013-03-12T09:23:53
|
|
Merge pull request #1408 from arrbee/refactor-iterators
Refactor iterators
|
|
62beacd3
|
2013-03-11T16:43:58
|
|
Sorting function cleanup and MinGW fix
Clean up some sorting function stuff including fixing qsort_r
on MinGW, common function pointer type for comparison, and basic
insertion sort implementation (which we, regrettably, fall back
on for MinGW).
|
|
b70bf922
|
2013-03-11T14:35:49
|
|
Merge pull request #1406 from cpthamilton/local_push
Implemented push on the local transport
|
|
20858f6e
|
2013-02-19T06:22:58
|
|
Implemented push on the local transport
|
|
a5eea2d7
|
2013-03-11T11:31:50
|
|
Stabilize order for equiv tree iterator entries
Given a group of case-insensitively equivalent tree iterator
entries, this ensures that the case-sensitively first trees will
be used as the representative items. I.e. if you have conflicting
entries "A/B/x", "a/b/x", and "A/b/x", this change ensures that
the earliest entry "A/B/x" will be returned. The actual choice
is not that important, but it is nice to have it stable and to
have it been either the first or last item, as opposed to a
random item from within the equivalent span.
|
|
eef7e80e
|
2013-03-11T10:57:19
|
|
Merge pull request #1407 from ethomson/tform_small_files
handle small files in similarity metrics
|
|
aa408cbf
|
2013-03-11T11:18:00
|
|
handle small files in similarity metrics
|
|
aec4f663
|
2013-03-11T10:37:12
|
|
Fix tree iterator advance using wrong name compare
Tree iterator advance was moving forward without taking the
filemode of the entries into account, equating "a" and "a/".
This makes the tree entry comparison code more easily reusable
and fixes the problem.
|
|
92028ea5
|
2013-03-11T09:53:49
|
|
Fix tree iterator path for tree issue + cleanups
This fixes an off by one error for generating full paths for
tree entries in tree iterators when INCLUDE_TREES is set. Also,
contains a bunch of small code cleanups with a couple of small
utility functions and macro changes to eliminate redundant code.
|
|
61c7b61e
|
2013-03-10T22:38:53
|
|
Use correct case path in icase tree iterator
If there are case-ambiguities in the path of a case insensitive
tree iterator, it will now rewrite the entire path when it gives
the path name to an entry, so a tree with "A/b/C/d.txt" and
"a/B/c/E.txt" will give the true full paths (instead of case-
folding them both to "A/B/C/d.txt" or "a/b/c/E.txt" or something
like that.
|
|
a03beb7b
|
2013-03-10T21:04:35
|
|
Add tests for case insensitive tree iterator
This adds a test case for ci tree iteration when there is a name
conflict. This points out a behavior quirk in the current version
that I'd like to fix - namely, all tree entries get mapped to one
version of the case pattern in the ci code - i.e. even if you have
A/1.txt and a/2.txt, both will be reported as a/1.txt and a/2.txt
because we only copy the name of a file at a given frame once. It
would be nice to fix this, but I'm worried about how complex that
is if you get a/B/c/1.txt and A/b/C/2.txt. It may require a walk
up the frames whenever you advance to the next item in a blended
equivalence class.
|
|
d768f9ad
|
2013-03-10T21:37:09
|
|
travis: join-less notifications
|
|
57e765b2
|
2013-03-09T08:09:17
|
|
Merge pull request #1175 from carlosmn/diff-0-ctx
Can't perform diff with no context lines
|
|
1aa5318a
|
2013-03-09T16:04:34
|
|
diff: allow asking for diffs with no context
Previously, 0 meant default. This is problematic, as asking for 0
context lines is a valid thing to do.
Change GIT_DIFF_OPTIONS_INIT to default to three and stop treating 0
as a magic value. In case no options are provided, make sure the
options in the diff object default to 3.
|
|
48bde2f1
|
2013-03-08T02:11:34
|
|
config: don't allow passing NULL as a value to set
Passing NULL is non-sensical. The error message leaves to be desired,
though, as it leaks internal implementation details. Catch it at the
`git_config_set_string` level and set an appropriate error message.
|
|
e40f1c2d
|
2013-03-08T16:39:57
|
|
Make tree iterator handle icase equivalence
There is a serious bug in the previous tree iterator implementation.
If case insensitivity resulted in member elements being equivalent
to one another, and those member elements were trees, then the
children of the colliding elements would be processed in sequence
instead of in a single flattened list. This meant that the tree
iterator was not truly acting like a case-insensitive list.
This completely reworks the tree iterator to manage lists with
case insensitive equivalence classes and advance through the items
in a unified manner in a single sorted frame.
It is possible that at a future date we might want to update this
to separate the case insensitive and case sensitive tree iterators
so that the case sensitive one could be a minimal amount of code
and the insensitive one would always know what it needed to do
without checking flags.
But there would be so much shared code between the two, that I'm
not sure it that's a win. For now, this gets what we need.
More tests are needed, though.
|
|
0887b580
|
2013-03-08T15:13:25
|
|
Use C99 stdio in mingw-w64
MinGW >= 3.14 does this automatically, but mingw-64 wants us to define
it.
|
|
92ebbe99
|
2013-03-07T12:06:18
|
|
Merge pull request #1399 from nathan-osman/development
Add SONAME build option to facilitate building for Android.
|
|
6f83a781
|
2013-03-07T11:14:03
|
|
Merge pull request #1403 from ethomson/tracing
Optional tracing back to consumers
|
|
b5ec5430
|
2013-03-04T23:52:30
|
|
optional tracing
|
|
33abaad8
|
2013-03-07T18:58:34
|
|
refs: Dude, you're OUT.
|
|
cdaef180
|
2013-03-07T18:44:10
|
|
Merge remote-tracking branch 'ethomson/immutable_refs' into development
|
|
d00d5464
|
2013-03-01T15:37:33
|
|
immutable references and a pluggable ref database
|
|
6a9ef012
|
2013-03-07T07:47:20
|
|
Merge pull request #1401 from carlosmn/leading-slash
refs: explicitly catch leading slashes
|
|
bb45c57f
|
2013-03-07T16:38:44
|
|
refs: explicitly catch leading slashes
It's somewhat common to try to write "/refs/tags/something". There is
no easy way to catch it during the main body of the function, as there
is no way to distinguish whether it's a leading slash or a double
slash somewhere in the middle.
Catch this at the beginning so we don't trigger the assert in
is_all_caps_and_underscore().
|
|
e7da9acd
|
2013-03-06T17:51:38
|
|
Added build option SONAME to control whether VERSION and SOVERSION were set for the git2 target, as some platforms require that this NOT be set.
|
|
9bea03ce
|
2013-03-06T15:16:34
|
|
Add INCLUDE_TREES, DONT_AUTOEXPAND iterator flags
This standardizes iterator behavior across all three iterators
(index, tree, and working directory). Previously the working
directory iterator behaved differently from the other two.
Each iterator can now operate in one of three modes:
1. *No tree results, auto expand trees* means that only non-
tree items will be returned and when a tree/directory is
encountered, we will automatically descend into it.
2. *Tree results, auto expand trees* means that results will
be given for every item found, including trees, but you
only need to call normal git_iterator_advance to yield
every item (i.e. trees returned with pre-order iteration).
3. *Tree results, no auto expand* means that calling the
normal git_iterator_advance when looking at a tree will
not descend into the tree, but will skip over it to the
next entry in the parent.
Previously, behavior 1 was the only option for index and tree
iterators, and behavior 3 was the only option for workdir.
The main public API implications of this are that the
`git_iterator_advance_into()` call is now valid for all
iterators, not just working directory iterators, and all the
existing uses of working directory iterators explicitly use
the GIT_ITERATOR_DONT_AUTOEXPAND (for now).
Interestingly, the majority of the implementation was in the
index iterator, since there are no tree entries there and now
have to fake them. The tree and working directory iterators
only required small modifications.
|
|
cc216a01
|
2013-03-05T16:29:04
|
|
Retire spoolandsort iterator
Since the case sensitivity is moved into the respective iterators,
this removes the spoolandsort iterator code.
|
|
169dc616
|
2013-03-05T16:10:05
|
|
Make iterator APIs consistent with standards
The iterator APIs are not currently consistent with the parameter
ordering of the rest of the codebase. This rearranges the order
of parameters, simplifies the naming of a number of functions, and
makes somewhat better use of macros internally to clean up the
iterator code.
This also expands the test coverage of iterator functionality,
making sure that case sensitive range-limited iteration works
correctly.
|
|
ed4f95e5
|
2013-03-05T11:47:07
|
|
Add const to some buffer functions
|
|
9952f24e
|
2013-03-06T16:02:26
|
|
No longer need clar_main.c
|
|
1b405a23
|
2013-03-06T13:58:21
|
|
Merge pull request #1396 from cholin/features/note-iterator
[RFC] basic note iterator implementation
|
|
aa518c70
|
2013-03-06T22:51:20
|
|
added missing free for git_note in clar tests
|
|
f7b18502
|
2013-03-06T22:25:01
|
|
fixed minor issues with new note iterator
* fixed style issues
* use new iterator functions for git_note_foreach()
|
|
69c28b75
|
2013-03-06T13:22:50
|
|
MSVC: Define NDEBUG to disable asserts in release builds
|
|
1a90dcf6
|
2013-03-06T19:07:56
|
|
use git_note_iterator type instead of non-public git_iterator one
|
|
6edb427b
|
2013-03-06T16:43:21
|
|
basic note iterator implementation
* git_note_iterator_new() - create a new note iterator
* git_note_next() - retrieves the next item of the iterator
|
|
d1bcc1a8
|
2013-03-06T03:05:10
|
|
Merge pull request #1392 from ethomson/push_test_fix
remote push test fix
|
|
4cc326e9
|
2013-03-05T22:45:26
|
|
remote push test fix
|
|
b72f5d40
|
2013-03-05T15:35:28
|
|
Merge pull request #1369 from arrbee/repo-init-template-hooks
More tests (and fixes) for initializing repo from template
|
|
3d74702e
|
2013-03-05T23:50:43
|
|
Make sure docurium can see git_packbuilder_foreach
|
|
b8daa9e0
|
2013-03-04T16:19:38
|
|
Merge pull request #1380 from phkelley/index_icase
Disable ignore_case when writing the index to a tree
|
|
f6d96409
|
2013-03-04T16:13:31
|
|
Merge pull request #1390 from ethomson/reuc_clear
clear REUC on checkout
|
|
5bddabcc
|
2013-03-04T17:40:48
|
|
clear REUC on checkout
|
|
323bb885
|
2013-03-04T00:21:56
|
|
Fix a few leaks
`git_diff_get_patch()` would unconditionally load the patch object and
then simply leak it if the user hadn't requested it. Short-circuit
loading the object if the user doesn't want it.
The rest of the plugs are simply calling the free functions of objects
allocated during the tests.
|
|
dce5f26f
|
2013-03-03T14:46:01
|
|
Merge pull request #1388 from carlosmn/hash-ref-delta
indexer: use a hashtable for keeping track of offsets
|
|
0e040c03
|
2013-03-03T14:50:47
|
|
indexer: use a hashtable for keeping track of offsets
These offsets are needed for REF_DELTA objects, which encode which
object they use as a base, but not where it lies in the packfile, so
we need a list.
These objects are mostly from older packfiles, before OFS_DELTA was
widely spread. The time spent in indexing these packfiles is greatly
reduced, though remains above what git is able to do.
|
|
29ab8774
|
2013-03-03T06:38:33
|
|
Merge pull request #1387 from carlosmn/kill-indexer
indexer: kill git_indexer
|
|
447ae791
|
2013-03-03T15:19:21
|
|
indexer: kill git_indexer
This was the first implementation and its goal was simply to have
something that worked. It is slow and now it's just taking up
space. Remove it and switch the one known usage to use the streaming
indexer.
|