|
96c01991
|
2013-05-15T09:24:51
|
|
Remove entry dup/free functions and fix comments
This removes the functions to duplicate and free copies of a
git_index_entry and updates the comments to explain that you
should just use the public definition of the struct as needed.
|
|
797dfb28
|
2013-05-13T16:09:33
|
|
Add APIs to dup and free git_index_entrys
This adds git_index_entry_dup to make a copy of an existing entry
and git_index_entry_free to release the memory of the copy. It
also updates the documentation for git_index_get_bypath and
git_index_get_byindex to make it clear that the returned structure
should *not* be modified.
|
|
71596200
|
2013-05-15T15:47:46
|
|
Merge pull request #1588 from arrbee/fixes-for-checkout-and-diff
Bug fixes for checkout and diff
|
|
79ef3be4
|
2013-05-15T14:50:05
|
|
Fix diff crash when last item is untracked dir
When the last item in a diff was an untracked directory that only
contained ignored items, the loop to scan the contents would run
off the end of the iterator and dereference a NULL pointer. This
includes a test that reproduces the problem and a fix.
|
|
1fed6b07
|
2013-05-13T21:57:37
|
|
Fix trailing whitespaces
|
|
f0ab7372
|
2013-05-15T17:51:57
|
|
signature: Lenient when dupping, strict when creating
|
|
bc2020d6
|
2013-05-14T16:39:19
|
|
Extend valgrind suppressions on Mac
|
|
b4d33e46
|
2013-05-14T21:54:26
|
|
Fix some memory leaks
|
|
99d32707
|
2013-05-11T06:42:25
|
|
Fix refdb iteration early termination bug
There was a problem found in the Rugged test suite where the
refdb_fs_backend__next function could exit too early in some
very specific hashing patterns for packed refs. This ports
the Rugged test to libgit2 and then fixes the bug.
|
|
b6cc559a
|
2013-05-11T02:42:49
|
|
Merge pull request #1385 from carlosmn/refs-iter
Introduce a refs iterator
|
|
c58cac12
|
2013-05-04T18:06:14
|
|
Introduce a glob-filtering iterator
If the backend doesn't provide support for it, the matching is done in
refdb on top of a normal iterator.
|
|
2b562c3a
|
2013-05-04T16:32:58
|
|
refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
|
|
932af0e9
|
2013-05-04T15:57:44
|
|
Add iterator support to the testdb backend
|
|
fb592a96
|
2013-05-04T15:54:57
|
|
Remove outdated test
Selecting wether to list loose or packed references is not something
we want to support anymore, so remove a test for this.
|
|
51fc5e89
|
2013-05-04T15:16:55
|
|
Make sure the ref iterator works in an repo without physical presence
|
|
4def7035
|
2013-03-02T19:31:03
|
|
refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
|
|
4a65aead
|
2013-05-10T10:49:22
|
|
Merge pull request #1571 from arrbee/what-if-ignorecase-lies
Improve ignore handling in git_status_file
|
|
c3a51711
|
2013-05-10T10:47:08
|
|
Merge pull request #1572 from arrbee/diff-patch-with-rename
Fix diff output for renames and copies
|
|
24988894
|
2013-05-10T12:02:17
|
|
Fix some memory leaks
|
|
e9ba61f3
|
2013-05-10T09:32:42
|
|
Fix diff output for renames and copies
If you use rename detection, the renamed and copied files would
not show any text diffs because the function that decides if
data should be loaded didn't know which sides of the diff to
load for those cases.
This adds a test that looks at the patch generated for diff
entries that are COPIED or RENAMED.
|
|
1f9e41ee
|
2013-05-10T07:50:53
|
|
Improve ignore handling in git_status_file
The git_status_file API was doing a hack to deal with files that
are inside ignored directories. The status scan was not reporting
any file in this case, so git_status_file would attempt a final
"stat()" call, and return IGNORED if the file actually existed.
On case-insensitive filesystems where core.ignorecase is set
incorrectly, this magic check can "succeed" and report a file
as ignored when it should actually return ENOTFOUND.
Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can
use that flag to make sure that git_status_file() will look into
ignored directories and eliminate the hack completely, so we give
the correct error.
|
|
3d1c9f61
|
2013-05-09T06:45:06
|
|
Fix git_repository_message docs
This clarifies the docs for git_repository_message and also adds
to the tests to explicitly check NUL termination of data when the
output buffer is smaller than the message size. There is a minor
behavior change so that a non-NULL output buffer will always be
NUL terminated (at length zero) if an error occurs.
|
|
ddc5c054
|
2013-05-09T05:42:37
|
|
Merge pull request #1561 from arrbee/fix-windows-diff-eofnl
Fix windows diff eofnl error
|
|
af795759
|
2013-05-07T15:09:11
|
|
Merge pull request #1552 from carlosmn/config-helpers
Config helpers for global/xdg config files
|
|
5d831887
|
2013-05-07T00:10:02
|
|
config: convenience function to open global/xdg
The rules for which one to open is a bit silly, so let's make it
easier for our users.
|
|
a4b75dcf
|
2013-05-06T21:51:25
|
|
repo: unconditionally create a global config backend
When a repository is initialised, we need to probe to see if there is
a global config to load. If this is not the case, the user isn't able
to write to the global config without creating the backend and adding
it themselves, which is inconvenient and overly complex.
Unconditionally create and add a backend for the global config file
regardless of whether it exists as a convenience for users.
To enable this, we allow creating backends to files that do not exist
yet, changing the semantics somewhat, and making some tests invalid.
|
|
0f938c6b
|
2013-05-07T09:59:53
|
|
Fix win32 type warnings
|
|
505b5d0c
|
2013-05-07T16:01:22
|
|
remote: correctly interpret tagopt '--tags'
When tagopt is set to '--tags', we should only take the default tags
refspec into account and ignore any configured ones.
Bring the code into compliance.
|
|
33665410
|
2013-05-07T08:00:44
|
|
Merge pull request #1556 from arrbee/diff-patch-fixes
Diff patch bug fixes
|
|
c2f602f8
|
2013-05-07T07:15:39
|
|
Fix line numbering for patches with eofnl
When a patch contained an eofnl change (i.e. the last line either
gained or lost a newline), the oldno and newno line number values
for the lines in the last hunk of the patch were not useful. This
makes them behave in a more expected manner.
|
|
fd96f98e
|
2013-05-07T04:36:42
|
|
More tests for files with no newline at end
|
|
e35e2684
|
2013-05-07T04:32:17
|
|
Add GIT_DIFF_LINE_CONTEXT_EOFNL
This adds a new line origin constant for the special line that
is used when both files end without a newline.
In the course of writing the tests for this, I was having problems
with modifying a file but not having diff notice because it was
the same size and modified less than one second from the start of
the test, so I decided to start working on nanosecond timestamp
support. This commit doesn't contain the nanosecond support, but
it contains the reorganization of maybe_modified and the hooks so
that if the nanosecond data were being read by stat() (or rather
being copied by git_index_entry__init_from_stat), then the nsec
would be taken into account.
This new stuff could probably use some more tests, although there
is some amount of it here.
|
|
3d42e9a3
|
2013-05-06T20:32:20
|
|
git_branch_set_upstream with local branches
Currently git_branch_set_upstream when passed a local branch
creates invalid configuration, for ex. if we setup branch
'tracking_master' to track local 'master' libgit2 generates
the following config
```
[branch "track_master"]
remote = .
merge = .refs/heads/track_master
```
The merge value is invalid and calling git_branch_upstream on
'tracking_master' results in invalid reference error.
It should do:
```
[branch "track_master"]
remote = .
merge = refs/heads/master
```
|
|
03c28d92
|
2013-05-06T06:45:53
|
|
Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
|
|
d5e5bbd7
|
2013-05-06T06:45:40
|
|
Merge pull request #1524 from jamill/clone_tagopts
By default do not set tagopt when cloning
|
|
6f748f38
|
2013-05-04T12:14:40
|
|
Do not write tagopt configuration option on clone by default
|
|
6e286e8d
|
2013-05-04T01:04:23
|
|
Remove obsolete test for peel type
Peeling to an invalid type is now checked via an assert so this
test is no longer relevant.
|
|
e09d18ee
|
2013-05-03T18:39:44
|
|
allow checkout to proceed when a dir to be removed is in use (win32)
|
|
d8041638
|
2013-05-02T17:22:13
|
|
fix some leaks
|
|
5e151329
|
2013-05-02T15:19:49
|
|
braces
|
|
4e7c1560
|
2013-05-02T14:58:40
|
|
puns are not funny; type punning especially so
|
|
7edb9071
|
2013-05-02T11:07:20
|
|
refdb_fs: do not require peeled packed refs to be tags
Older versions of git would only write peeled entries for
items under refs/tags/. Newer versions will write them for
all refs, and we should be prepared to handle that.
|
|
d82d66c9
|
2013-05-02T03:05:21
|
|
Extra threading tests
We need to hammer the packfile open phase harder in the thread
tests, in addition to the cache API.
|
|
0cc7d8df
|
2013-05-01T09:50:40
|
|
allow empty dirs to exist when doing checkout
|
|
e1807113
|
2013-05-01T15:31:23
|
|
merge: Warning noise
|
|
3e199f42
|
2013-05-01T04:18:46
|
|
Set error message for branch functions
There were a couple of places where an error was being returned
from branch related code but no error message was being set.
|
|
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!
|
|
a66c4bc8
|
2013-04-29T02:57:01
|
|
More tests for diff untracked directories
This includes more tests for various scenarios when diff includes
an untracked directory in the workdir with contents either ignored
or not.
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
bd0a07f4
|
2013-04-23T12:28:59
|
|
Clone: replace fetch spec with custom value
|
|
dfdf709e
|
2013-04-23T21:29:07
|
|
get last refspec in clone test
|
|
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
|
|
cf9709b6
|
2013-04-22T16:53:46
|
|
tests: Do not warn for unused variable
|
|
865e2dd4
|
2013-04-17T23:58:37
|
|
tests: Cleanup commit parse testing code
|
|
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.
|
|
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.
|
|
917f60c5
|
2013-04-12T13:04:08
|
|
Add tests for oidmap and new cache with threading
This adds some basic tests for the oidmap just to make sure that
collisions, etc. are dealt with correctly.
This also adds some tests for the new caching that check if items
are inserted (or not inserted) properly into the cache, and that
the cache can hold up in a multithreaded environment without error.
|
|
8842c75f
|
2013-04-03T22:30:07
|
|
What has science done.
|
|
5df18424
|
2013-04-01T19:38:23
|
|
lol this worked first try wtf
|
|
a472f887
|
2013-04-22T07:44:32
|
|
Merge pull request #1493 from carlosmn/remotes
Revamp the refspec handling
|
|
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.
|
|
1384b688
|
2013-04-19T13:00:12
|
|
Move some low-level repo fns to include/git2/sys
|
|
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.
|
|
8f24e65f
|
2013-04-20T16:20:21
|
|
Plug a couple of leaks
|
|
4e4eab52
|
2013-04-19T18:19:53
|
|
alloc doesn't take a refdb; git_refdb_free nicely in the tests
|
|
38fd8121
|
2013-04-18T14:48:20
|
|
Fix win64 warnings
|
|
9ea29c8f
|
2013-04-18T14:41:16
|
|
Fix fs iterator test on case sensitive fs
|
|
2aee1aa4
|
2013-04-18T14:35:13
|
|
Fix uninitialized var warnings
|
|
627d5908
|
2013-04-18T14:14:22
|
|
More filesystem iterator tests
Refactors the helper function that builds a directory hierarchy
and then made use of it to try more variations on filesystem
iterator tests.
|
|
ff0ddfa4
|
2013-04-17T15:56:31
|
|
Add filesystem iterator variant
This adds a new variant iterator that is a raw filesystem iterator
for scanning directories from a root. There is still more work to
do to blend this with the working directory iterator.
|
|
53cb8757
|
2013-04-17T15:27:53
|
|
Merge pull request #1478 from ethomson/win32_typechange_test
use a longer string for dummy data in test to avoid conflicting w/ index
|
|
8023b83a
|
2013-04-17T17:21:17
|
|
use a longer string for dummy data in test to avoid conflicting w/ index
|
|
3be933b1
|
2013-04-17T17:33:51
|
|
refs: Add `git_referene_target_peel`
|
|
24f61bc5
|
2013-04-15T15:47:38
|
|
Merge pull request #1469 from libgit2/vmg/unified-revision
Unified rev-parse, with a revision object
|
|
cbda09d0
|
2013-04-15T23:40:46
|
|
git_revision -> git_revspec
|
|
36c2dfed
|
2013-04-15T23:32:40
|
|
Is this crazy?
|
|
67ba7d20
|
2013-04-15T22:53:57
|
|
Allow git_remote_ls after disconnecting from the remote
Keep the data around until free, as expected by our own fetch example
|
|
d064c747
|
2013-04-15T23:18:24
|
|
Merge remote-tracking branch 'ben/unified-revparse' into development
|
|
299a224b
|
2013-04-15T12:00:04
|
|
Change git_revparse to output git_object pointers
This will probably prevent many lookup/free
operations in calling code.
|
|
2ebc3c66
|
2013-04-15T11:57:24
|
|
Redeploy git_revparse_single.
|
|
4a3f69b5
|
2013-04-15T20:20:14
|
|
refdb tests: use the right variable size
Mixing int and size_t through pointers leads to problems
in big-endian machines.
|