|
43e5dda7
|
2013-08-12T11:21:57
|
|
config: get rid of a useless asignment
|
|
86c02614
|
2013-08-09T11:05:02
|
|
config: deduplicate iterator creation
When the glob iterator is passed NULL regexp, call the non-globbing
iterator so we don't have to special-case which functions to call.
|
|
d8488b98
|
2013-08-09T10:37:35
|
|
config: implement _foreach and _foreach_match on top of the iterator directly
Use a glob iterator instead of going through
git_config_backend_foreach_match. This function is left as it's
exposed in the API.
|
|
54f3a572
|
2013-08-09T10:29:11
|
|
config: introduce a regex-filtering iterator
|
|
d8289b9f
|
2013-08-09T11:03:13
|
|
config: handle empty backends when iterating
|
|
5880962d
|
2013-08-09T09:05:19
|
|
config: introduce _iterator_new()
As the name suggests, it iterates over all the entries
|
|
a319ffae
|
2013-08-08T21:00:33
|
|
config: fix leaks in the iterators
|
|
1e96c9d5
|
2013-08-08T20:47:06
|
|
config: add _next() and _iterator_free()
Make it look like the refs iterator API.
|
|
99dfb538
|
2013-08-08T17:57:59
|
|
config: working multivar iterator
Implement the foreach version as a wrapper around the iterator.
|
|
cca5df63
|
2013-08-08T16:59:39
|
|
config: hopefully get the iterator to work on multivars
|
|
3a7ffc29
|
2013-08-08T16:18:07
|
|
config: initial multivar iterator
|
|
eba73992
|
2013-08-08T14:39:32
|
|
config: move next() and free() into the iterator
Like we have in the references iterator, next and free belong in the
iterator itself.
|
|
4efa3290
|
2013-08-08T13:41:18
|
|
config: get_multivar -> get_multivar_foreach
The plain function will return an iterator, so move this one out of
the way.
|
|
84fec6f6
|
2013-08-08T13:14:35
|
|
config: saner iterator errors
Really report an error in foreach if we fail to allocate the iterator,
and don't fail if the config is emtpy.
|
|
82ae6fcd
|
2013-08-08T11:55:47
|
|
config: compilation fixes
|
|
4d588d97
|
2013-08-08T11:24:47
|
|
Don't typedef a pointer
Make the iterator structure opaque and make sure it compiles.
|
|
a603c191
|
2013-03-18T21:02:36
|
|
replaced foreach() with non callback based iterations in git_config_backend
new functions in struct git_config_backend:
* iterator_new(...)
* iterator_free(...)
* next(...)
The old callback based foreach style can still be used with `git_config_backend_foreach_match`
|
|
6385fc5f
|
2013-03-17T20:39:01
|
|
added new type and several functions to git_strmap
This step is needed to easily add iterators to git_config_backend
As well use these new git_strmap functions to implement foreach
* git_strmap_iter
* git_strmap_has_data(...)
* git_strmap_begin(...)
* git_strmap_end(...)
* git_strmap_next(...)
|
|
2d9f5b9f
|
2013-08-07T11:11:55
|
|
Parse config headers with quoted quotes
Parse config headers that have the last quote on the
line quoted instead of walking off the end.
|
|
f1af935b
|
2013-08-05T21:53:09
|
|
submodule: check alloc and name presense
|
|
f5254d78
|
2013-07-27T20:15:06
|
|
Fix possible double close
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
3a2d48d5
|
2013-07-25T14:54:19
|
|
Close p->mwf.fd only if necessary
This fixes a regression introduced in revision 9d2f841a5d39fc25ce722a3904f6ebc9aa112222.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
c05a55b0
|
2013-07-23T09:40:19
|
|
Clean up some documentation
clang's docparser highlighted these.
|
|
989710d9
|
2013-07-22T11:22:55
|
|
Fix warning message about mismatched types
|
|
c77342ef
|
2013-07-22T11:20:34
|
|
Use pool for loose refdb string allocations
Instead of using lots of strdup calls, this adds a memory pool to
the loose refs iteration code and uses it for keeping track of the
loose refs array. Memory usage could probably be reduced even
further by eliminating the vector and just scanning by adding the
strlen of each ref, but that would be a more intrusive changes.
This also updates the error handling to be more thorough about
checking for failed allocations, etc.
|
|
b7107131
|
2013-07-22T11:01:19
|
|
git_reference_next_name must match git_reference_next
The git_reference_next API silently skips invalid references when
scanning the loose refs. The git_reference_next_name API should
skip the same ones even though it isn't creating the reference
object.
This adds a test with a an invalid loose reference and makes sure
that both APIs skip the same entries and generate the same results.
|
|
97309dd0
|
2013-07-19T10:43:53
|
|
Merge pull request #1726 from crazymaster/development
git_buf_text_gather_stats doesn't work for multi-byte characters
|
|
99a9c86c
|
2013-07-17T20:08:15
|
|
Merge pull request #1722 from libgit2/ntk/fix/issue_1722
git_revparse_ext: should return a NULL reference when the revparse expression doesn't lead to a reference
|
|
d55bed1a
|
2013-07-17T16:55:00
|
|
don't include ignored as rename candidates
|
|
f5385150
|
2013-07-15T09:45:04
|
|
Merge pull request #1728 from ivoire/small_fixes
Small fixes
|
|
85e1eded
|
2013-07-15T16:31:25
|
|
Add `git_remote_owner`
|
|
c6451624
|
2013-07-15T16:00:07
|
|
Fix some more memory leaks in error path
|
|
050af8bb
|
2013-07-15T16:00:00
|
|
pack: fix memory leak in error path
|
|
8d6ef4bf
|
2013-07-15T15:59:35
|
|
index: fix potential memory leaks
|
|
9146f1e5
|
2013-07-15T15:59:18
|
|
repository: clarify assignment and test order
|
|
b74d4478
|
2013-07-15T07:41:39
|
|
Fix the initial line
|
|
6550565a
|
2013-07-13T03:02:00
|
|
Fix gather_stats
|
|
80fd31fa
|
2013-07-13T13:30:23
|
|
revparse: Don't return a reference when asked for a git object
Fix #1722
|
|
b3a559dd
|
2013-07-13T13:55:03
|
|
submodule: Fix memory leaks
|
|
0a1c8f55
|
2013-07-11T17:09:15
|
|
preload configuration paths
|
|
584f2d30
|
2013-07-11T11:04:42
|
|
Fix warnings on Win64
|
|
814de0bc
|
2013-07-11T11:00:41
|
|
Update git__swap thread helper
This makes git__swap use the __sync_lock_test_and_set primitive
with GCC and the InterlockedExchangePointer primitive with MSVC.
Previously is used compare_and_swap in a way that was probably
unintuitive for most thinking (i.e. it could fail to swap in the
value if another thread raced in). Now it will always succeed
and the last thread to run in a race will win instead of the
first thread.
This also fixes up a little confusion between volatile void **
and void * volatile * that came up with the Win32 compiler.
|
|
125655fe
|
2013-07-02T16:49:57
|
|
Untracked directories with .git should be ignored
This restores a behavior that was accidentally lost during some
diff refactoring where an untracked directory that contains a .git
item should be treated as IGNORED, not as UNTRACKED. The submodule
code already detects this, but the diff code was not handling the
scenario right.
This also updates a number of existing tests that were actually
exercising the behavior but did not have the right expectations in
place. It actually makes the new
`test_diff_submodules__diff_ignore_options` test feel much better
because the "not-a-submodule" entries are now ignored instead of
showing up as untracked items.
Fixes #1697
|
|
b8df28a5
|
2013-06-30T08:38:10
|
|
Clean up left over alloc change
|
|
f9775a37
|
2013-06-29T23:22:31
|
|
Add ignore_submodules to diff options
This adds correct support for an equivalent to --ignore-submodules
in diff, where an actual ignore value can be passed to diff to
override the per submodule settings in the configuration.
This required tweaking the constants for ignore values so that
zero would not be used and could represent an unset option to the
diff. This was an opportunity to move the submodule values into
include/git2/types.h and to rename the poorly named DEFAULT values
for ignore and update constants to RESET instead.
Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as
setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL
(which is actually a minor change from the old behavior in that
submodules will now be treated as UNMODIFIED deltas instead of
being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED).
This includes tests for the various new settings.
|
|
2e3e273e
|
2013-06-29T13:20:45
|
|
Update diff to new internal submodule status API
Submodules now expose an internal status API that allows diff to
get back the OID values from the submodule very easily and also
to avoiding caching issues and to override the ignore setting for
the submodule.
|
|
1aad6137
|
2013-06-29T13:16:33
|
|
Submodule status improvements
This fixes the way that submodule status is checked to bypass just
about all of the caching in the submodule object. Based on the
ignore value, it will try to do the minimum work necessary to find
the current status of the submodule - but it will actually go to
disk to get all of the current values.
This also removes the custom refcounting stuff in favor of the
common git_refcount style. Right now, it is still for internal
purposes only, but it should make it easier to add true submodule
refcounting in the future with a public git_submodule_free call
that will allow bindings not to worry about the submodule object
getting freed from underneath them.
|
|
3fe046cf
|
2013-06-29T13:13:38
|
|
Add BARE option to git_repository_open_ext
This adds a BARE option to git_repository_open_ext which allows
a fast open path that still knows how to read gitlinks and to
search for the actual .git directory from a subdirectory.
`git_repository_open_bare` is still simpler and faster, but having
a gitlink aware fast open is very useful for submodules where we
want to quickly be able to peek at the HEAD and index data without
doing any other meaningful repo operations.
|
|
302a04b0
|
2013-06-29T12:41:39
|
|
Add accessors for refcount value
|
|
e807860f
|
2013-06-27T16:52:38
|
|
Add timestamp check to submodule status
This is probably not the final form of this change, but this is
a preliminary version of checking a timestamp to see if the cached
working directory HEAD OID matches the current. Right now, this
uses the timestamp on the index and is, like most of our timestamp
checking, subject to having only second accuracy.
|
|
41f1f9d7
|
2013-06-27T16:52:00
|
|
Add API to get path to index file
|
|
406dd556
|
2013-07-10T21:05:47
|
|
bitvec: Simplify the bit vector code
|
|
2b672d5b
|
2013-07-08T22:46:36
|
|
Add git_pathspec_match_diff API
This adds an additional pathspec API that will match a pathspec
against a diff object. This is convenient if you want to handle
renames (so you need the whole diff and can't use the pathspec
constraint built into the diff API) but still want to tell if the
diff had any files that matched the pathspec.
When the pathspec is matched against a diff, instead of keeping
a list of filenames that matched, instead the API keeps the list
of git_diff_deltas that matched and they can be retrieved via a
new API git_pathspec_match_list_diff_entry.
There are a couple of other minor API extensions here that were
mostly for the sake of convenience and to reduce dependencies
on knowing the internal data structure between files inside the
library.
|
|
6fc5a581
|
2013-07-08T22:42:02
|
|
Basic bit vector
This is a simple bit vector object that is not resizable after
the initial allocation but can be of arbitrary size. It will
keep the bti vector entirely on the stack for vectors 64 bits
or less, and will allocate the vector on the heap for larger
sizes. The API is uniform regardless of storage location.
This is very basic right now and all the APIs are inline functions,
but it is useful for storing an array of boolean values.
|
|
9abc78ae
|
2013-07-07T21:56:11
|
|
Convert commit->parent_ids to git_array_t
This converts the array of parent SHAs from a git_vector where
each SHA has to be separately allocated to a git_array_t where
all the SHAs can be kept in one block. Since the two collections
have almost identical APIs, there isn't much involved in making
the change. I did add an API to git_array_t so that it could be
allocated at a precise initial size.
|
|
a8b5f116
|
2013-07-03T17:00:50
|
|
Fix example/log.c pathspec handling of merges
This fixes the way the example log program decides if a merge
commit should be shown when a pathspec is given. Also makes it
easier to use the pathspec API to just check "does a tree match
anything in the pathspec" without allocating a match list.
|
|
f094f905
|
2013-07-01T15:41:01
|
|
Add raw header access to commit API
|
|
d2ce27dd
|
2013-06-24T23:16:06
|
|
Add public API for pathspec matching
This adds a new public API for compiling pathspecs and matching
them against the working directory, the index, or a tree from the
repository. This also reworks the pathspec internals to allow the
sharing of code between the existing internal usage of pathspec
matching and the new external API.
While this is working and the new API is ready for discussion, I
think there is still an incorrect behavior in which patterns are
always matched against the full path of an entry without taking
the subdirectories into account (so "s*" will match "subdir/file"
even though it wouldn't with core Git). Further enhancements are
coming, but this was a good place to take a functional snapshot.
|
|
bf3ee3cf
|
2013-07-10T10:58:58
|
|
Merge pull request #1705 from arrbee/avoid-index-double-free
Try harder not to double free index entries
|
|
33c8c6f0
|
2013-07-10T10:48:32
|
|
trivial whitespace fixup
|
|
c2de6b1a
|
2013-07-10T10:21:24
|
|
Bring SSH error reporting up to base standards
The SSH error checking and reporting could still be further
improved by using the libssh2 native methods to get error info,
but at least this ensures that all error codes are checked and
translated into libgit2 error messages.
|
|
68bc49a1
|
2013-07-10T09:20:46
|
|
Merge branch 'ssh-cred-fix' of tiennou/libgit2
Conflicts:
src/transports/ssh.c
|
|
08bf80fa
|
2013-07-10T10:29:32
|
|
Tab indent.
|
|
367c1903
|
2013-07-10T10:29:09
|
|
Add some missing error messages.
|
|
b8cd7aa9
|
2013-07-09T17:20:55
|
|
Merge pull request #1704 from arrbee/kill-status-index-then-workdir
Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
|
|
77fa06f3
|
2013-07-09T17:20:36
|
|
Merge pull request #1695 from arrbee/fix-1695
API should not be ifdeffed
|
|
e4fda954
|
2013-07-09T16:46:18
|
|
A little git_config_get_multivar code cleanup
|
|
07fba63e
|
2013-07-06T23:51:40
|
|
Fix return value in git_config_get_multivar
If there is not an error, the return value was always the return value
of the last call to file->get_multivar
With this commit GIT_ENOTFOUND is only returned if all the calls to
filge-get_multivar return GIT_ENOTFOUND.
|
|
290e1479
|
2013-07-09T16:17:41
|
|
Add GIT_CAP_SSH if library was built with SSH
This also adds a test that actually calls git_libgit2_capabilities
and git_libgit2_version.
|
|
a4456929
|
2013-07-09T16:16:24
|
|
Make credential clearing consistent
This makes all of the credential objects use the same pattern to
clear the contents and call git__memzero when done. Much of this
information is probably not sensitive, but it also seems better
to just clear consistently.
|
|
03d9b930
|
2013-07-09T14:45:58
|
|
Indent with tabs
|
|
3eae9467
|
2013-07-09T14:24:57
|
|
Merge pull request #1710 from arrbee/fix-1710
Null byte in hunk header
|
|
5813bc21
|
2013-07-09T12:01:16
|
|
Lots of SSH credential stuff can be left on
Much of the SSH credential creation API can be left enabled even
on platforms with no SSH support. We really just have to give an
error when you attempt to open the SSH connection.
|
|
a3c062db
|
2013-07-09T09:58:33
|
|
Make SSH APIs present even without SSH support
The SSH APIs will just return an error code and state that the
library was built without SSH support if they are called in
that case.
|
|
2274993b
|
2013-07-09T12:52:25
|
|
Make the git_signature const in the stash API.
|
|
a5f9b5f8
|
2013-07-05T16:59:38
|
|
Diff hunk context off by one on long lines
The diff hunk context string that is returned to xdiff need not
be NUL terminated because the xdiff code just copies the number of
bytes that you report directly into the output. There was an off
by one in the diff driver code when the header context was longer
than the output buffer size, the output buffer length included
the NUL byte which was copied into the hunk header.
Fixes #1710
|
|
82cb8e23
|
2013-07-05T10:52:24
|
|
Merge pull request #1692 from arrbee/fix-1692
Segmentation fault on git_clone
|
|
f6bd0863
|
2013-07-03T22:02:44
|
|
Fix a probable leak.
|
|
219f318c
|
2013-07-03T22:02:29
|
|
Fix a crash if git_remote_set_cred_acquire_cb wasn't called before connecting.
Fixes #1700.
|
|
2a16914c
|
2013-07-03T12:20:34
|
|
Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
This option serves no benefit now that the git_status_list API
is available. It was of questionable value before and now it
would just be a bad idea to use it rather than the indexed API.
|
|
178aa39c
|
2013-07-03T11:42:43
|
|
Be more thread aware with some index updates
The index isn't really thread safe for the most part, but we can
easily be more careful and avoid double frees and the like, which
are serious problems (as opposed to a lookup which might return
the incorrect value but if the index in being updated, that is
much harder to avoid).
|
|
9b6075b2
|
2013-07-03T17:07:20
|
|
Fix segfault in git_status_foreach_ext()
Add tests for the `GIT_STATUS_SHOW_XXX` flags.
|
|
55ededfd
|
2013-07-01T10:21:14
|
|
Make refspec_transform paranoid about arguments
|
|
278ce746
|
2013-07-01T10:20:38
|
|
Add helpful buffer shorten function
|
|
c4ac556e
|
2013-06-29T12:48:58
|
|
Fix compilation warnings
|
|
f2c41884
|
2013-06-27T22:48:46
|
|
Merge pull request #1688 from arrbee/submodule-load-ignore-orphaned-head
Test submodules with empty index or orphaned head
|
|
1e9dd60f
|
2013-06-27T22:29:05
|
|
Test submodules with empty index or orphaned head
In both of these cases, the submodule data should still be loaded
just (obviously) without the data that comes from either the index
or the HEAD.
This fixes a bug in the orphaned head case.
|
|
c67ff958
|
2013-06-27T07:38:27
|
|
Fix bug marking submodule diffs as unmodified
There was a bug where submodules whose HEAD had not been moved
were being marked as having an UNMODIFIED delta record instead
of being left MODIFIED. This fixes that and fixes the tests to
notice if a submodule has been incorrectly marked as UNMODIFIED.
|
|
b0401c68
|
2013-06-25T16:36:50
|
|
Merge pull request #1681 from arthurschreiber/patch-1
Prefer younger merge bases over older ones.
|
|
d0c36a0b
|
2013-06-25T10:42:38
|
|
Merge pull request #1678 from arthurschreiber/unbreak-local-ls-after-disconnect
Unbreak git_remote_ls on a local transport after disconnecting.
|
|
3736b64f
|
2013-06-25T18:36:37
|
|
Prefer younger merge bases over older ones.
git-core prefers younger merge bases over older ones in case that multiple valid merge bases exists.
|
|
47537112
|
2013-06-25T16:46:06
|
|
Correctly handle junctions
A junction has S_IFDIR | S_IFLNK set, however, only one makes sense.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
022a45e0
|
2013-06-25T16:43:15
|
|
Revert "Work around reparse point stat issues"
This reverts commit 32c12ea6a9cafd76a746af2e2be9366c95752f5b.
|
|
9728cfde
|
2013-06-25T11:17:55
|
|
Make sure we don't leak memory again.
|
|
edbaa63a
|
2013-06-25T09:04:04
|
|
Unbreak git_remote_ls on a local transport after disconnecting.
|
|
8c510b83
|
2013-06-24T21:02:42
|
|
Fix a leak in the local transport code.
|
|
09ee60c6
|
2013-06-24T11:21:09
|
|
Merge pull request #1670 from arrbee/open-cloexec
Add O_CLOEXEC to open calls
|
|
6c4dadba
|
2013-06-24T11:20:57
|
|
Merge pull request #1669 from arrbee/fix-index-add-bypath
In loose objects backend, constrain mkdir calls to avoid extra mkdirs
|
|
32c12ea6
|
2013-06-24T09:19:24
|
|
Work around reparse point stat issues
In theory, p_stat should never return an S_ISLNK result, but due
to the current implementation on Windows with mount points it is
possible that it will. For now, work around that by allowing a
link in the path to a directory being created. If it is really a
problem, then the issue will be caught on the next iteration of
the loop, but typically this will be the right thing to do.
|
|
3d3ea4dc
|
2013-06-22T20:58:32
|
|
Add O_CLOEXEC to open calls
|