|
4795807a
|
2012-04-23T17:25:11
|
|
Merge pull request #637 from nulltoken/issue/odb-refcount
Fix git_repository_set_odb() refcount issue
|
|
baf861a5
|
2012-04-23T11:07:19
|
|
Fix git_repository_set_odb() refcount issue
git_repository_free() calls git_odb_free() if the owned odb is not null.
According to the doc, when setting a new odb through git_repository_set_odb() the caller has to take care of releasing the odb by himself.
|
|
5c9a794d
|
2012-04-21T18:36:13
|
|
tests-clar: update to latest version of clar
Signed-off-by: schu <schu-github@schulog.org>
|
|
54e4d0f2
|
2012-04-18T17:34:52
|
|
Merge pull request #629 from nulltoken/issue/index-refcount
Index refcount issue
|
|
2c1075d6
|
2012-03-16T12:52:49
|
|
config: parse quoted values
Variable values may be quoted to include newlines, literal quotes and
other characters. Add support for these and test it.
|
|
3fa1ec4a
|
2012-04-15T19:02:05
|
|
tests-clar/repo: fix unused warning
ifdef GIT_WIN32 helper unposix_path() to avoid unused-function warning
on non-Windows systems.
Signed-off-by: schu <schu-github@schulog.org>
|
|
c1aefb35
|
2012-04-14T14:13:17
|
|
Fix git_repository_set_index() refcount issue
git_repository_free() calls git_index_free() if the owned index is not null.
According to the doc, when setting a new index through git_repository_set_index() the caller has still to take care of releasing the index by itself.
In order to cope with this, this fix makes sure the index refcount is incremented when a new repository is being plugged a new index.
|
|
fdd1149c
|
2012-04-14T13:46:13
|
|
Fix MSVC compilation warnings
Removed unreferenced variables.
|
|
14a513e0
|
2012-04-13T15:00:29
|
|
Add support for pathspec to diff and status
This adds preliminary support for pathspecs to diff and status.
The implementation is not very optimized (it still looks at
every single file and evaluated the the pathspec match against
them), but it works.
|
|
d1f33156
|
2012-04-13T20:41:06
|
|
Merge remote-tracking branch 'carlosmn/revwalk-merge-base' into new-error-handling
|
|
5cf7bccd
|
2012-03-03T17:25:05
|
|
revwalk: add test hiding a commit without a merge base
Nothing should be hidden and this shouldn't bother the merge base
calculation.
|
|
de7ab85d
|
2012-03-03T03:31:51
|
|
Implement git_merge_base()
It's implemented in revwalk.c so it has access to the revision
walker's commit cache and related functions. The algorithm is the one
used by git, modified so it fits better with the library's functions.
|
|
06b9d915
|
2012-02-28T02:19:57
|
|
revwalk: allow pushing/hiding a reference by name
The code was already there, so factor it out and let users push an OID
by giving it a reference name. Only refs to commits are
supported. Annotated tags will throw an error.
|
|
7784bcbb
|
2012-04-11T11:52:59
|
|
Refactor git_repository_open with new options
Add a new command `git_repository_open_ext` with extended options
that control how searching for a repository will be done. The
existing `git_repository_open` and `git_repository_discover` are
reimplemented on top of it. We may want to change the default
behavior of `git_repository_open` but this commit does not do that.
Improve support for "gitdir" files where the work dir is separate
from the repo and support for the "separate-git-dir" config. Also,
add support for opening repos created with `git-new-workdir` script
(although I have only confirmed that they can be opened, not that
all functions work correctly).
There are also a few minor changes that came up:
- Fix `git_path_prettify` to allow in-place prettifying.
- Fix `git_path_root` to support backslashes on Win32. This fix
should help many repo open/discover scenarios - it is the one
function called when opening before prettifying the path.
- Tweak `git_config_get_string` to set the "out" pointer to NULL
if the config value is not found. Allows some other cleanup.
- Fix a couple places that should have been calling
`git_repository_config__weakptr` and were not.
- Fix `cl_git_sandbox_init` clar helper to support bare repos.
|
|
1de77cd3
|
2012-04-11T12:10:14
|
|
Cannot set workdir to a nonexistent dir
|
|
e1f6f94a
|
2012-04-11T19:17:21
|
|
tests: Remove unused file
|
|
0a20eee9
|
2012-04-11T03:43:30
|
|
Merge pull request #619 from nulltoken/topic/branches
Basic branch management API
|
|
b78fb64d
|
2012-04-10T14:03:47
|
|
repository: make git_repository_set_workdir() prettify the path it is being passed
|
|
4615f0f7
|
2012-04-09T03:22:14
|
|
branch: add git_branch_move()
|
|
555aa453
|
2012-04-09T02:28:31
|
|
fileops: Make git_futils_mkdir_r() able to skip non-empty directories
|
|
731df570
|
2012-04-04T15:57:19
|
|
Add basic branch management API: git_branch_create(), git_branch_delete(), git_branch_list()
|
|
79fd4230
|
2012-04-06T15:23:18
|
|
transport/local: Fix peeling of nested tags
|
|
3f46f313
|
2012-04-06T14:34:26
|
|
tag: Add git_tag_peel() which recursively peel a tag until a non tag git_object is met
|
|
efef3795
|
2012-04-04T10:37:25
|
|
Merge pull request #618 from nulltoken/fix/warning
Fix compilation warning
|
|
17bd6de3
|
2012-04-04T13:59:58
|
|
Fix MSVC "unreferenced local variable" compilation warning.
|
|
8e8b6b01
|
2012-04-04T13:13:43
|
|
Clean up valgrind warnings
|
|
09719c50
|
2012-03-14T12:13:03
|
|
reference: Fix creation of references with extended ASCII characters in their name
|
|
bfc9ca59
|
2012-03-28T16:45:36
|
|
Added submodule API and use in status
When processing status for a newly checked out repo, it is
possible that there will be submodules that have not yet been
initialized. The only way to distinguish these from untracked
directories is to have some knowledge of submodules. This
commit adds a new submodule API which, given a name or path,
can determine if it appears to be a submodule and can give
information about the submodule.
|
|
277e3041
|
2012-03-26T11:22:27
|
|
Fix handling of submodules in trees
|
|
875bfc5f
|
2012-03-25T21:26:48
|
|
Fix error in tree iterator when popping up trees
There was an error in the tree iterator where it would
delete two tree levels instead of just one when popping
up a tree level. Unfortunately the test data for the
tree iterator did not have any deep trees with subtrees
in the middle of the tree items, so this problem went
unnoticed. This contains the 1-line fix plus new test
data and tests that reveal the issue.
|
|
c8838ee9
|
2012-03-23T11:03:01
|
|
Restore default status recursion behavior
This gives `git_status_foreach()` back its old behavior of
emulating the "--untracked=all" behavior of git. You can
get any of the various --untracked options by passing flags
to `git_status_foreach_ext()` but the basic version will
keep the behavior it has always had.
|
|
4b136a94
|
2012-03-23T09:26:09
|
|
Fix crash in new status and add recurse option
This fixes the bug that @nulltoken found (thank you!) where
if there were untracked directories alphabetically after the
last tracked item, the diff implementation would deref a NULL
pointer.
The fix involved the code which decides if it is necessary
to recurse into a directory in the working dir, so it was
easy to add a new option `GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS`
to control if the contents of untracked directories should be
included in status.
|
|
98c4613e
|
2012-03-22T13:10:23
|
|
Migrate remaining status tests to Clar
This finishes up the migration of remaining tests from
tests/t18-status.c over the tests-clar/status/worktree.c.
|
|
a56aacf4
|
2012-03-22T12:03:30
|
|
More status testing
This "fixes" the broken t18 status tests to accurately reflect
the new behavior for "created" untracked subdirectories. See
discussion in the PR for more details.
This also contains the submodules unit test that I forgot to
git add, and ports most of the t18-status.c tests to clar (still
missing a couple of the git_status_file() single file tests).
|
|
95340398
|
2012-03-22T09:17:34
|
|
Adding new tests for new status command
This is a work in progress. This adds two new sets of tests,
the issue_592 tests from @nulltoken's pull request #601 and
some new tests for submodules. The submodule tests still have
issues where the status is not reported correctly. That needs
to be fixed before merge.
|
|
a4c291ef
|
2012-03-20T21:57:38
|
|
Convert reflog to new errors
Cleaned up some other issues.
|
|
7c7ff7d1
|
2012-03-19T16:10:11
|
|
Migrate index, oid, and utils to new errors
This includes a few cleanups that came up while converting
these files.
This commit introduces a could new git error classes, including
the catchall class: GITERR_INVALID which I'm using as the class
for invalid and out of range values which are detected at too low
a level of library to use a higher level classification. For
example, an overflow error in parsing an integer or a bad letter
in parsing an OID string would generate an error in this class.
|
|
fd771427
|
2012-03-19T16:09:03
|
|
Update to latest clar
|
|
0d0fa7c3
|
2012-03-16T15:56:01
|
|
Convert attr, ignore, mwindow, status to new errors
Also cleaned up some previously converted code that still had
little things to polish.
|
|
7b93079b
|
2012-03-16T15:16:52
|
|
Make git_path_root() cope with windows network paths
Fix libgit2/libgit2sharp#125
|
|
e3c47510
|
2012-03-13T14:23:24
|
|
Resolve comments from pull request
This converts the map validation function into a macro, tweaks
the GITERR_OS system error automatic appending, and adds a
tentative new error access API and some quick unit tests for
both the old and new error APIs.
|
|
e1de726c
|
2012-03-12T22:55:40
|
|
Migrate ODB files to new error handling
This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to
the new style of error handling. Also got the unix and win32
versions of map.c. There are some minor changes to other
files but no others were completely converted.
This also contains an update to filebuf so that a zeroed out
filebuf will not think that the fd (== 0) is actually open
(and inadvertently call close() on fd 0 if cleaned up).
Lastly, this was built and tested on win32 and contains a
bunch of fixes for the win32 build which was pretty broken.
|
|
9d160ba8
|
2012-03-06T01:37:56
|
|
diff: Fix rebase breackage
|
|
1a481123
|
2012-02-17T00:13:34
|
|
error-handling: References
Yes, this is error handling solely for `refs.c`, but some of the
abstractions leak all ofer the code base.
|
|
60bc2d20
|
2012-02-14T21:23:11
|
|
error-handling: Add new routines
Obviously all the old throw routines are still in place, so we can
gradually port over.
|
|
529df4df
|
2012-03-02T15:57:06
|
|
Fixes for merge of filters branch
|
|
e1bcc191
|
2012-03-01T11:45:00
|
|
Revert GIT_STATUS constants to avoid issues
This reverts the changes to the GIT_STATUS constants and adds a
new enumeration to describe the type of change in a git_diff_delta.
I don't love this solution, but it should prevent strange errors
from occurring for now. Eventually, I would like to unify the
various status constants, but it needs a larger plan and I just
wanted to eliminate this breakage quickly.
|
|
c19bc93c
|
2012-02-29T14:19:39
|
|
Fixing memory leaks indicated by valgrind
This clears up the memory leaks that valgrind seems to find on
my machine.
|
|
854eccbb
|
2012-02-29T12:04:59
|
|
Clean up GIT_UNUSED macros on all platforms
It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
did not fix the GIT_USUSED behavior on all platforms. This commit
walks through and really cleans things up more thoroughly, getting
rid of the unnecessary stuff.
To remove the use of some GIT_UNUSED, I ended up adding a couple
of new iterators for hashtables that allow you to iterator just
over keys or just over values.
In making this change, I found a bug in the clar tests (where we
were doing *count++ but meant to do (*count)++ to increment the
value). I fixed that but then found the test failing because it
was not really using an empty repo. So, I took some of the code
that I wrote for iterator testing and moved it to clar_helpers.c,
then made use of that to make it easier to open fixtures on a
per test basis even within a single test file.
|
|
74fa4bfa
|
2012-02-28T16:14:47
|
|
Update diff to use iterators
This is a major reorganization of the diff code. This changes
the diff functions to use the iterators for traversing the
content. This allowed a lot of code to be simplified. Also,
this moved the functions relating to outputting a diff into a
new file (diff_output.c).
This includes a number of other changes - adding utility
functions, extending iterators, etc. plus more tests for the
diff code. This also takes the example diff.c program much
further in terms of emulating git-diff command line options.
|
|
760db29c
|
2012-02-21T15:09:04
|
|
Fixing unit tests post rebase
Some changes that merged cleanly actually broke the unit
tests, so this fixes them.
|
|
caf71ec0
|
2012-02-07T15:30:18
|
|
Add tests and fix bugs for diff whitespace options
Once I added tests for the whitespace handling options of
diff, I realized that there were some bugs. This fixes
those and adds the new tests into the test suite.
|
|
a2e895be
|
2012-02-07T12:14:28
|
|
Continue implementation of git-diff
* Implemented git_diff_index_to_tree
* Reworked git_diff_options structure to handle more options
* Made most of the options in git_diff_options actually work
* Reorganized code a bit to remove some redundancy
* Added option parsing to examples/diff.c to test most options
|
|
3a437590
|
2012-02-03T16:53:01
|
|
Clean up diff implementation for review
This fixes several bugs, updates tests and docs, eliminates the
FILE* assumption in favor of printing callbacks for the diff patch
formatter helpers, and adds a "diff" example function that can
perform a diff from the command line.
|
|
2705576b
|
2012-01-24T14:06:42
|
|
Simplify GIT_UNUSED macros
Since casting to void works to eliminate errors with unused
parameters on all platforms, avoid the various special cases.
Over time, it will make sense to eliminate the GIT_UNUSED
macro completely and just have GIT_UNUSED_ARG.
|
|
7e3fc623
|
2012-01-23T10:54:49
|
|
Add test for possible attr bug
This is a test that should replicate an issue that Peff
is setting with git attributes. But the test doesn't fail.
|
|
e3d55b2a
|
2012-03-02T15:44:15
|
|
Merge pull request #575 from libgit2/filters
Filters, yo
|
|
ce49c7a8
|
2012-03-02T15:09:40
|
|
Add filter tests and fix some bugs
This adds some initial unit tests for file filtering and fixes
some simple bugs in filter application.
|
|
d377fe80
|
2012-03-02T22:12:46
|
|
attr: Add missing header to test suite
|
|
c63793ee
|
2012-03-02T03:51:45
|
|
attr: Change the attribute check macros
The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be
able to change the way that true and false values are stored inside of
the returned gitattributes value pointer.
However, if these macros are implemented as a simple rename for the
`git_attr__true` pointer, they will always be used with the `==`
operator, and hence we cannot really change the implementation to any
other way that doesn't imply using special pointer values and comparing
them!
We need to do the same thing that core Git does, which is using a
function macro. With `GIT_ATTR_TRUE(attr)`, we can change
internally the way that these values are stored to anything we want.
This commit does that, and rewrites a large chunk of the attributes test
suite to remove duplicated code for expected attributes, and to
properly test the function macro behavior instead of comparing
pointers.
|
|
a4a910dd
|
2012-02-27T22:46:45
|
|
Simple test for pushing HEAD and hiding a branch
|
|
f7367993
|
2012-02-27T22:22:45
|
|
revwalk: add convenience function to push/hide HEAD
It's not unusual to want the walker to act on HEAD, so add a
convencience function for the case that the user doesn't already have
a resolved HEAD reference.
|
|
f0fa1c1a
|
2012-02-27T22:00:49
|
|
Add revwalk glob test
|
|
8f7be6ca
|
2012-02-27T21:30:22
|
|
Move revwalk test to clar
|
|
13224ea4
|
2012-02-27T04:28:31
|
|
buffer: Unify `git_fbuffer` and `git_buf`
This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.
Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.
Hopefully this won't break anything.
|
|
8171998f
|
2012-02-26T19:15:36
|
|
Add git_remote_list()
Loops through the configuration and generates a list of configured
remotes.
|
|
6b63589e
|
2012-02-25T19:00:58
|
|
config: add more comprehensive multivar tests
|
|
9554cd51
|
2012-02-24T12:14:26
|
|
A remote exists with an URL alone
We used to consider it an error if a remote didn't have at least a
fetch refspec. This was too much checking, as a remote doesn't in fact
need to have anything other than an URL configured to be considered
a remote.
|
|
aa4254d9
|
2012-02-23T23:27:29
|
|
tests-clar/notes: init oid before using
Reported-by: Carlos Martín Nieto <carlos@cmartin.tk>
Signed-off-by: schu <schu-github@schulog.org>
|
|
f01fa266
|
2012-02-23T11:17:48
|
|
Fix workdir iterator unit tests
This test is fragile if you leave extra files in the test
data directory, such as a foo.c~ file from editing with
Emacs. Who would do such a thing?
|
|
36d72a51
|
2012-02-22T16:06:33
|
|
Merge pull request #570 from arrbee/uniform-iterators
Uniform iterators for trees, index, and workdir
|
|
da337c80
|
2012-02-22T11:22:33
|
|
Iterator improvements from diff implementation
This makes two changes to iterator behavior: first, advance
can optionally do the work of returning the new current value.
This is such a common pattern that it really cleans up usage.
Second, for workdir iterators, this removes automatically
iterating into directories. That seemed like a good idea,
but when an entirely new directory hierarchy is introduced
into the workdir, there is no reason to iterate into it if
there are no corresponding entries in the tree/index that it
is being compared to.
This second change actually wasn't a lot of code because not
descending into directories was already the behavior for
ignored directories. This just extends that to all directories.
|
|
8d36b253
|
2012-02-22T11:12:20
|
|
Merge pull request #565 from carlosmn/multimap
Add config multivar support
|
|
b6c93aef
|
2012-02-21T14:46:24
|
|
Uniform iterators for trees, index, and workdir
This create a new git_iterator type of object that provides a
uniform interface for iterating over the index, an arbitrary
tree, or the working directory of a repository.
As part of this, git ignore support was extended to support
push and pop of directory-based ignore files as the working
directory is being traversed (so the array of ignores does
not have to be recreated at each directory during traveral).
There are a number of other small utility functions in buffer,
path, vector, and fileops that are included in this patch
that made the iterator implementation cleaner.
|
|
89e5ed98
|
2012-02-20T19:04:45
|
|
Add git_remote_save()
|
|
bcb8c007
|
2012-02-20T18:37:07
|
|
Add git_remote_set_{fetch,push}spec()
Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.
|
|
3005855f
|
2012-02-05T00:29:26
|
|
Implement setting multivars
|
|
5e0dc4af
|
2012-02-04T23:18:30
|
|
Support getting multivars
|
|
78d65f39
|
2012-02-01T17:47:17
|
|
tests: add multivar read test
|
|
bf477ed4
|
2012-02-15T00:33:38
|
|
Add git notes API
This commit adds basic git notes support to libgit2, namely:
* git_note_read
* git_note_message
* git_note_oid
* git_note_create
* git_note_remove
In the long run, we probably want to provide some convenience callback
mechanism for merging and moving (filter-branch) notes.
Signed-off-by: schu <schu-github@schulog.org>
|
|
b4b79ac3
|
2012-02-15T00:12:53
|
|
commit: actually allow yet to be born update_ref
git_commit_create is supposed to update the given reference
"update_ref", but segfaulted in case of a yet to be born
reference. Fix it.
Signed-off-by: schu <schu-github@schulog.org>
|
|
90e6c620
|
2012-02-13T12:13:05
|
|
tests-clar: fix warning sign-compare
Signed-off-by: schu <schu-github@schulog.org>
|
|
99abb79d
|
2012-02-03T12:45:43
|
|
repository: ensure that the path to the .git directory ends with a forward slash when opening a repository through a working directory path
This fixes an issue which was detected while using one of the libgit2 bindings [0]. The lack of the trailing forward slash led the name of references returned by git_reference_listall() to be prefixed with a forward slash.
[0]: https://github.com/libgit2/libgit2sharp/pull/108
|
|
e8c96ed2
|
2012-02-01T12:30:35
|
|
Add unit tests for recent bug fixes
Add unit tests to confirm ignore directory pattern matches and
to confirm that ignore and attribute files are loaded properly
into the attribute file cache.
|
|
bf0107d1
|
2012-02-01T17:35:11
|
|
Merge remote-tracking branch 'arrbee/status-bugs' into development
|
|
771cde43
|
2012-02-01T04:40:18
|
|
tests: free the remotes temp buffer
|
|
adc9bdb3
|
2012-01-31T13:59:32
|
|
Fix attr path is_dir check
When building an attr path object, the code that checks if the
file is a directory was evaluating the file as a relative path
to the current working directory, instead of using the repo root.
This lead to inconsistent behavior.
|
|
279afd2a
|
2012-01-31T17:21:49
|
|
refspec: a ref name includes the refs/ prefix
git_refspec_transform_r assumed that the reference name passed would
be only a branch or tag name. This is not the case, and we need to
take into consideration what's in the refspec's source to know how
much of the prefix to ignore.
|
|
f25cc58d
|
2012-01-27T18:29:03
|
|
clar: Remove pregenerated files
Those were re-added on the move. Ops!
|
|
5663e61a
|
2012-01-25T16:44:21
|
|
repository: add minimal reinitialization of repository
This currently only ensures that the version of the repository format isn't greater than zero.
|
|
9b84447a
|
2012-01-25T12:35:25
|
|
clay: migrate a test initializing a repository which path escapes the current working directory
A non migrated yet test has been removed as well as it's mostly redundant.
|
|
3fd1520c
|
2012-01-24T20:35:15
|
|
Rename the Clay test suite to Clar
Clay is the name of a programming language on the makings, and we want
to avoid confusions. Sorry for the huge diff!
|