|
1744fafe
|
2012-01-17T15:49:47
|
|
Move path related functions from fileops to path
This takes all of the functions that look up simple data about
paths (such as `git_futils_isdir`) and moves them over to path.h
(becoming `git_path_isdir`). This leaves fileops.h just with
functions that actually manipulate the filesystem or look at
the file contents in some way.
As part of this, the dir.h header which is really just for win32
support was moved into win32 (with some minor changes).
|
|
6a67a812
|
2012-01-11T16:01:48
|
|
Allow ignores (and attribs) for nonexistent files
This fixes issue 532 that attributes (and gitignores) could not
be checked for files that don't exist. It should be possible to
query such things regardless of the existence of the file.
|
|
fdaa9240
|
2012-01-11T15:25:13
|
|
Fix up status tests
|
|
df743c7d
|
2012-01-09T15:37:19
|
|
Initial implementation of gitignore support
Adds support for .gitignore files to git_status_foreach() and
git_status_file(). This includes refactoring the gitattributes
code to share logic where possible. The GIT_STATUS_IGNORED flag
will now be passed in for files that are ignored (provided they
are not already in the index or the head of repo).
|
|
f2114d0a
|
2012-01-04T22:40:59
|
|
Merge remote-tracking branch 'nulltoken/topix/path_fromurl' into development
Conflicts:
tests-clay/clay.h
tests-clay/clay_main.c
|
|
bd370b14
|
2011-12-30T15:00:14
|
|
Improved gitattributes macro implementation
This updates to implementation of gitattribute macros to be much more
similar to core git (albeit not 100%) and to handle expansion of
macros within macros, etc. It also cleans up the refcounting usage
with macros to be much cleaner.
Also, this adds a new vector function `git_vector_insert_sorted()`
which allows you to maintain a sorted list as you go. In order to
write that function, this changes the function `git__bsearch()` to
take a somewhat different set of parameters, although the core
functionality is still the same.
|
|
73b51450
|
2011-12-28T23:28:50
|
|
Add support for macros and cache flush API.
Add support for git attribute macro definitions. Also, add
support for cache flush API to clear the attribute file content
cache when needed.
Additionally, improved the handling of global and system files,
making common utility functions in fileops and converting config
and attr to both use the common functions.
Adds a bunch more tests and fixed some memory leaks. Note that
adding macros required me to use refcounted attribute assignment
definitions, which complicated, but probably improved memory usage.
|
|
eb8de747
|
2011-12-28T20:24:58
|
|
util: add git__fromhex()
|
|
ee1f0b1a
|
2011-12-16T10:56:43
|
|
Add APIs for git attributes
This adds APIs for querying git attributes. In addition to
the new API in include/git2/attr.h, most of the action is in
src/attr_file.[hc] which contains utilities for dealing with
a single attributes file, and src/attr.[hc] which contains
the implementation of the APIs that merge all applicable
attributes files.
|
|
b5daae68
|
2011-12-14T12:34:43
|
|
Allow git_buf_joinpath to accept self-joins
It was not safe for git_buf_joinpath to be used with a pointer
into the buf itself because a reallocation could invalidate
the input parameter that pointed into the buffer. This patch
makes it safe to self join, at least for the leading input to
the join, which is the common "append" case for self joins.
Also added unit tests to explicitly cover this case.
This should actually fix #511
|
|
97769280
|
2011-11-30T11:27:15
|
|
Use git_buf for path storage instead of stack-based buffers
This converts virtually all of the places that allocate GIT_PATH_MAX
buffers on the stack for manipulating paths to use git_buf objects
instead. The patch is pretty careful not to touch the public API
for libgit2, so there are a few places that still use GIT_PATH_MAX.
This extends and changes some details of the git_buf implementation
to add a couple of extra functions and to make error handling easier.
This includes serious alterations to all the path.c functions, and
several of the fileops.c ones, too. Also, there are a number of new
functions that parallel existing ones except that use a git_buf
instead of a stack-based buffer (such as git_config_find_global_r
that exists alongsize git_config_find_global).
This also modifies the win32 version of p_realpath to allocate whatever
buffer size is needed to accommodate the realpath instead of hardcoding
a GIT_PATH_MAX limit, but that change needs to be tested still.
|
|
89886d0b
|
2011-11-28T21:08:29
|
|
Plug a bunch of leaks
|
|
b54b88c4
|
2011-11-26T06:20:14
|
|
tests: Add `refs` folder to the `bad_tag.git` repo
|
|
45e79e37
|
2011-11-26T04:59:21
|
|
Rename all `_close` methods
There's no difference between `_free` and `_close` semantics: keep
everything with the same name to avoid confusions.
|
|
9462c471
|
2011-11-25T08:16:26
|
|
repository: Change ownership semantics
The ownership semantics have been changed all over the library to be
consistent. There are no more "borrowed" or duplicated references.
Main changes:
- `git_repository_open2` and `3` have been dropped.
- Added setters and getters to hotswap all the repository owned
objects:
`git_repository_index`
`git_repository_set_index`
`git_repository_odb`
`git_repository_set_odb`
`git_repository_config`
`git_repository_set_config`
`git_repository_workdir`
`git_repository_set_workdir`
Now working directories/index files/ODBs and so on can be
hot-swapped after creating a repository and between operations.
- All these objects now have proper ownership semantics with
refcounting: they all require freeing after they are no longer
needed (the repository always keeps its internal reference).
- Repository open and initialization has been updated to keep in
mind the configuration files. Bare repositories are now always
detected, and a default config file is created on init.
- All the tests affected by these changes have been dropped from the
old test suite and ported to the new one.
|
|
b762e576
|
2011-11-17T15:10:27
|
|
filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups
Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT
and make git_filebuf_open and git_filebuf_cleanup safe to be called
multiple times on the same buffer.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0c49ec2d
|
2011-11-07T19:34:24
|
|
Implement p_rename
Move the callers of git_futils_mv_atomic to use p_rename.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
3b83bdac
|
2011-11-07T06:25:22
|
|
Merge pull request #470 from schu/test-helpers-no-assert
test_helpers: do not rely on assert
|
|
d4a0b124
|
2011-10-30T21:58:33
|
|
refs: Partial rewrite for read-only refs
This new version of the references code is significantly faster and
hopefully easier to read.
External API stays the same. A new method `git_reference_reload()` has
been added to force updating a memory reference from disk. In-memory
references are no longer updated automagically -- this was killing us.
If a reference is deleted externally and the user doesn't reload the
memory object, nothing critical happens: any functions using that
reference should fail gracefully (e.g. deletion, renaming, and so on).
All generated references from the API are read only and must be free'd
by the user. There is no reference counting and no traces of generated
references are kept in the library.
There is no longer an internal representation for references. There is
only one reference struct `git_reference`, and symbolic/oid targets are
stored inside an union.
Packfile references are stored using an optimized struct with flex array
for reference names. This should significantly reduce the memory cost of
loading the packfile from disk.
|
|
75abd2b9
|
2011-08-11T19:38:13
|
|
Free all used references in the source tree
Since references are not owned by the repository anymore we have to free
them manually now.
Signed-off-by: schu <schu-github@schulog.org>
|
|
4fd89fa0
|
2011-07-26T11:17:32
|
|
refs: add test case checking "immutable" references
Signed-off-by: schu <schu-github@schulog.org>
|
|
a46ec457
|
2011-08-10T16:19:42
|
|
refs: split internal and external references
Currently libgit2 shares pointers to its internal reference cache with
the user. This leads to several problems like invalidation of reference
pointers when reordering the cache or manipulation of the cache from
user side.
Give each user its own git_reference instead of leaking the internal
representation (struct reference).
Add the following new API functions:
* git_reference_free
* git_reference_is_packed
Signed-off-by: schu <schu-github@schulog.org>
|
|
ec907944
|
2011-10-30T13:48:00
|
|
test_helpers: do not rely on assert
The functions loose_object_mode and loose_object_dir_mode call stat
inside an assert statement which isn't evaluated when compiling in
Release mode (NDEBUG) and leads to failing tests. Replace it.
Signed-off-by: schu <schu-github@schulog.org>
|
|
d3104fa0
|
2011-10-29T14:06:36
|
|
Merge pull request #468 from nulltoken/ntk/fix/issue-465
Status: fix segfault (#465) and order issues
|
|
a1bd78ea
|
2011-10-29T21:29:31
|
|
status: Add a file in the test repository to cover the correct sorting of entries when the working folder is being read
In this case, "subdir.txt" should be listed before the "subdir" directory.
|
|
89fb8f02
|
2011-10-28T19:04:23
|
|
Merge pull request #456 from brodie/perm-fixes
Create objects, indexes, and directories with the right file permissions
|
|
3286c408
|
2011-10-28T14:51:13
|
|
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
252840a5
|
2011-08-11T15:18:04
|
|
tests: propagate errors from open_temp_repo() instead of exiting
This makes it slightly easier to debug test failures when one test
opens a repo, has a failure, and doesn't get a chance to close it for
the next test. Now, instead of getting no feedback, we at least see
test failure information.
|
|
01ad7b3a
|
2011-09-06T15:48:45
|
|
*: correct and codify various file permissions
The following files now have 0444 permissions:
- loose objects
- pack indexes
- pack files
- packs downloaded by fetch
- packs downloaded by the HTTP transport
And the following files now have 0666 permissions:
- config files
- repository indexes
- reflogs
- refs
This brings libgit2 more in line with Git.
Note that git_filebuf_commit() and git_filebuf_commit_at() have both
gained a new mode parameter.
The latter change fixes an important issue where filebufs created with
GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
usage). Now we chmod() the file before renaming it into place.
Tests have been added to confirm that new commit, tag, and tree
objects are created with the right permissions. I don't have access to
Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
|
|
ce8cd006
|
2011-09-07T15:32:44
|
|
fileops/repository: create (most) directories with 0777 permissions
To further match how Git behaves, this change makes most of the
directories libgit2 creates in a git repo have a file mode of
0777. Specifically:
- Intermediate directories created with git_futils_mkpath2file() have
0777 permissions. This affects odb_loose, reflog, and refs.
- The top level folder for bare repos is created with 0777
permissions.
- The top level folder for non-bare repos is created with 0755
permissions.
- /objects/info/, /objects/pack/, /refs/heads/, and /refs/tags/ are
created with 0777 permissions.
Additionally, the following changes have been made:
- fileops functions that create intermediate directories have grown a
new dirmode parameter. The only exception to this is filebuf's
lock_file(), which unconditionally creates intermediate directories
with 0777 permissions when GIT_FILEBUF_FORCE is set.
- The test runner now sets the umask to 0 before running any
tests. This ensurses all file mode checks are consistent across
systems.
- t09-tree.c now does a directory permissions check. I've avoided
adding this check to other tests that might reuse existing
directories from the prefabricated test repos. Because they're
checked into the repo, they have 0755 permissions.
- Other assorted directories created by tests have 0777 permissions.
|
|
33127043
|
2011-10-14T14:18:02
|
|
fileops/posix: replace usage of "int mode" with "mode_t mode"
Note: Functions exported from fileops take const mode_t, while the
underlying POSIX wrappers take mode_t.
|
|
a6c0e4d2
|
2011-10-11T14:42:48
|
|
Fix minor indentation issues
|
|
b3f993e2
|
2011-10-09T13:13:49
|
|
Add test commit containing subtrees and files
|
|
6f2856f3
|
2011-10-05T15:17:37
|
|
signature: don't blow up trying to parse names containing '>'
When trying to find the end of an email, instead of starting at the
beginning of the signature, we start at the end of the name (after the
first '<').
This brings libgit2 more in line with Git's behavior when reading out
existing signatures.
However, note that Git does not allow names like these through the
usual porcelain; instead, it silently strips any '>' characters it
sees.
|
|
15b0bed2
|
2011-08-11T16:12:29
|
|
tag: allow the tagger field to be missing when parsing tags
Instead of bailing out with an error, this sets tagger to NULL when
the field is missing from the object.
This makes it possible to inspect tags like this one:
http://git.kernel.org/?p=git/git.git;a=tag;h=f25a265a342aed6041ab0cc484224d9ca54b6f41
|
|
cf7b13f3
|
2011-08-11T14:05:55
|
|
tag: avoid a double-free when parsing tags without a tagger field
The v0.99 tag in the Git repo triggers this behavior:
http://git.kernel.org/?p=git/git.git;a=tag;h=d6602ec5194c87b0fc87103ca4d67251c76f233a
Ideally, we'd allow the tag to be instantiated even though the tagger
field is missing, but this at the very least prevents libgit2 from
crashing.
To test this bug, a new repository has been added based on the test
branch in testrepo.git. It contains a "e90810b" tag that looks like
this:
object e90810b8df3e80c413d903f631643c716887138d
type commit
tag e90810b
This is a very simple tag.
|
|
04f78802
|
2011-08-09T20:49:12
|
|
commit: properly parse empty commit messages
This ensures commit->message is always non-NULL, even if the commit
message is empty or consists of only a newline.
One such commit can be found in the wild in the jQuery repository:
https://github.com/jquery/jquery/commit/25b424134f9927a5bf0bab5cba836a0aa6c3cfc1
|
|
9ac581bf
|
2011-10-01T19:56:04
|
|
config: behave like git with [section.subsection]
The documentation is a bit misleading. The subsection name is always
case-sensitive, but with a [section.subsection] header, the subsection
is transformed to lowercase when the configuration is parsed.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
107e30e9
|
2011-09-30T16:25:03
|
|
core: One last `long long`
|
|
fafd4710
|
2011-09-30T16:08:06
|
|
config: Proper type declarations for 64 bit ints
|
|
40fe5fbe
|
2011-09-22T22:50:36
|
|
Make repo config loading automatic or completely explicit
git_repository_config wants to take the global and system paths again
so that one can be explicit if needed.
The git_repository_config_autoload function is provided for the cases
when it's good enough for the library to guess where those files are
located.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
59116392
|
2011-09-27T05:35:34
|
|
Merge pull request #427 from schu/fix-unused-parameters
t18-status.c: fix unused warnings
|
|
01d7fded
|
2011-09-22T20:44:30
|
|
Revert "Rewrite getenv to use Win32 version on Windows"
This reverts commit e1b86444676b70154bf8ab450d429bdef57a8276.
|
|
ddeaa7fb
|
2011-09-24T13:41:10
|
|
t18-status.c: fix unused warnings
Signed-off-by: schu <schu-github@schulog.org>
|
|
ad196c6a
|
2011-09-21T23:17:39
|
|
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
Should fix issue #419.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
|
|
e1b86444
|
2011-09-21T11:17:30
|
|
Rewrite getenv to use Win32 version on Windows
|
|
b4ec3c64
|
2011-09-19T22:19:59
|
|
refs: add additional test for reference renaming
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
c498701d
|
2011-09-19T10:38:44
|
|
Fix tests to use portable setenv
|
|
71a4c1f1
|
2011-09-18T20:07:59
|
|
Merge pull request #384 from kiryl/warnings
Add more -W flags to CFLAGS
|
|
6640266e
|
2011-09-18T19:58:22
|
|
Merge pull request #398 from carlosmn/config-autohome
git_repository_config: open global config file automatically
|
|
afdf8dcb
|
2011-09-17T16:28:18
|
|
Add some forgotten asserts in the status tests
|
|
8320001d
|
2011-09-17T16:07:28
|
|
Fix a off-by-one error in the git_status_foreach tests
Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
|
|
bcba8460
|
2011-09-16T05:44:21
|
|
Revert changes to t18
...Ops, I broke the old test when porting it to Clay.
|
|
11385c3c
|
2011-09-16T05:12:56
|
|
Add sample "Status" clay tests
|
|
d8b903da
|
2011-09-11T18:46:08
|
|
status: enhance determination of statuses for a whole directory
- Should increase performance through usage of a walker
- No callback invocation for unaltered entries
|
|
56453d34
|
2011-09-02T13:44:42
|
|
status: enhance determination of status for a single file
- fix retrieval of a file status when working against a newly initialized repository
- reduce memory pressure
- prevents a directory from being tested
|
|
a9daa9bc
|
2011-09-02T10:07:42
|
|
Mark the resources in the test folder as binary to prevent unexpected line-feed conversion
|
|
f9d4b0c3
|
2011-09-12T17:25:46
|
|
git_repository_config: open global config file automatically
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
d568d585
|
2011-08-30T23:55:22
|
|
CMakefile: add -Wmissing-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
51d00446
|
2011-08-30T23:33:59
|
|
CMakefile: add -Wstrict-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
932669b8
|
2011-08-25T14:22:57
|
|
Drop STRLEN() macros
There is no need in STRLEN macros. Compilers can do this trivial
optimization on its own.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
e7be57a9
|
2011-08-15T18:56:27
|
|
reflog: assimilate reflog API to return git_oid's
Rather than returning the OIDs out of the reflog as string return them
as git_oid.
Signed-off-by: schu <schu-github@schulog.org>
|
|
5ae2f0c0
|
2011-08-12T16:24:19
|
|
commit: Add support for Encoding header
|
|
befae28f
|
2011-08-10T21:19:21
|
|
t12-repo.c: fix failing test discover0
discover0 tried to stat a non existing directory. Create it beforehand.
Signed-off-by: schu <schu-github@schulog.org>
|
|
ccd122fd
|
2011-07-22T12:31:51
|
|
discover: Make test run in temporary folder instead of altering the test resources folder
|
|
f6867e63
|
2011-08-08T16:56:28
|
|
Fix compilation in Windows
|
|
6e6ec54b
|
2011-08-06T11:26:59
|
|
Force the test's main function to use cdecl under Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
9d76b934
|
2011-08-04T22:49:39
|
|
Fix wrong test in t04-commit
Replace all must_pass(strcmp()) by must_be_true(strcmp()==0)
|
|
63396a39
|
2011-08-03T15:57:33
|
|
signature: adjust API to return error codes
git_signature_new() and git_signature_now() currently don't return error
codes. Change the API to return error codes and not pointers to let the
user handle errors properly.
Signed-off-by: schu <schu-github@schulog.org>
|
|
5274c31a
|
2011-08-03T01:17:31
|
|
signature.c: fix off-by-one error
Signed-off-by: schu <schu-github@schulog.org>
|
|
7d3ec3ca
|
2011-08-02T19:23:00
|
|
Fix memory leak when wrong object type is looked up from cache
Update unit test accordingly : no need to close
|
|
eed2714b
|
2011-08-01T17:00:31
|
|
reflog: avoid users writing a wrong ancestor OID
Disallow NULL as ancestor OID when writing a reflog entry for an
existing reference.
Signed-off-by: schu <schu-github@schulog.org>
|
|
20a7e820
|
2011-07-26T15:53:52
|
|
Remove extra git_index_read from the tests
When you open an index with git_index_open, the file is read before
the function returns. Thus, calling git_index_read after that is
useless.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
84ef7f36
|
2011-07-15T18:34:20
|
|
tests: fix cast warnings
/home/kas/git/public/libgit2/tests/t00-core.c: In function ‘test_cmp’:
/home/kas/git/public/libgit2/tests/t00-core.c:78:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t00-core.c:78:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t07-hashtable.c: In function ‘hash_func’:
/home/kas/git/public/libgit2/tests/t07-hashtable.c:42:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write0’:
/home/kas/git/public/libgit2/tests/t08-tag.c:141:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write2’:
/home/kas/git/public/libgit2/tests/t08-tag.c:192:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write3’:
/home/kas/git/public/libgit2/tests/t08-tag.c:227:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__write0’:
/home/kas/git/public/libgit2/tests/t04-commit.c:650:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c:651:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__root0’:
/home/kas/git/public/libgit2/tests/t04-commit.c:723:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t04-commit.c:724:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
/home/kas/git/public/libgit2/tests/t12-repo.c: In function ‘write_file’:
/home/kas/git/public/libgit2/tests/t12-repo.c:360:24: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
324f0eec
|
2011-07-13T18:03:12
|
|
Merge pull request #325 from carlosmn/valgrind
More memory leaks
|
|
f4ad64c1
|
2011-07-13T07:58:17
|
|
tree: fix insertion of entries with invalid filenames
|
|
cd0fe1ac
|
2011-07-12T20:46:07
|
|
Free sig in reflog test
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
d4760a42
|
2011-07-12T11:29:36
|
|
status: refactor the tests to remove some code duplication
|
|
55e1609b
|
2011-07-12T18:10:31
|
|
Don't leak the buf when testing it
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
b08683ff
|
2011-07-12T02:38:20
|
|
config: Rename `del` to `delete
|
|
bfbb5562
|
2011-07-11T16:30:46
|
|
tag: Add creation of lightweight tag
|
|
eb1fd1d0
|
2011-07-11T19:28:07
|
|
What the fuck was this doing in `src`?
|
|
7757be33
|
2011-07-10T07:48:52
|
|
reflog: Fix reflog writer/reader
- Use a space to separate oids and signature
- Enforce test coverage
- Make test run in a temporary folder in order not to alter the test repository
|
|
c52736fa
|
2011-07-09T15:05:14
|
|
status: Cleanup
The `hashfile` function has been moved to ODB, next to `git_odb_hash`.
Global state has been removed from the dirent call in `status.c`,
because global state is killing the rainforest and causing global
warming.
|
|
3b2a423c
|
2011-07-09T00:08:52
|
|
status: nonexistent file with git_status_file()
Throws GIT_ENOTFOUND error if given a filename that is not in
HEAD, index, nor the work tree.
|
|
2b90cc26
|
2011-07-08T23:51:05
|
|
status: consolidate some test code
Refactored copy of test repo to a function.
|
|
34dfea27
|
2011-06-24T20:36:53
|
|
status: handle subdirs for git_status_file
|
|
6b251490
|
2011-06-24T18:35:06
|
|
status: add subdir to test repo
|
|
20361b2f
|
2011-06-23T18:51:22
|
|
status: get status for single file
Add git_status_file to be able to retrieve status of single file by
supplying a path.
|
|
3af6b34a
|
2011-06-22T18:31:20
|
|
status: get file statuses and run callback
Add git_status_foreach() to run a callback on each file passing the path
and a status value.
|
|
210940da
|
2011-06-22T18:23:57
|
|
status: new test repo
|
|
205166d2
|
2011-06-22T18:19:46
|
|
status: get blob object id of file on disk
Add git_status_hashfile() to get blob's object id for a file without adding
it to the object database or needing a repository at all.
This functionality is similar to `git hash-object` without '-w'.
|
|
7361857c
|
2011-07-08T22:44:15
|
|
Update tests/NAMING
|
|
06c43821
|
2011-07-09T02:37:16
|
|
Remove unused methods
The direct-writes commit left some (slow) internals methods that
were no longer needed. These have been removed.
Also, the Reflog code was using the old `git_signature__write`, so
it has been rewritten to use a normal buffer and the new `writebuf`
signature writer. It's now slightly simpler and faster.
|
|
afeecf4f
|
2011-07-09T02:10:46
|
|
odb: Direct writes are back
DIRECT WRITES ARE BACK AND FASTER THAN EVER. The streaming writer to the
ODB was an overkill for the smaller objects like Commit and Tags; most
of the streaming logic was taking too long.
This commit makes Commits, Tags and Trees to be built-up in memory, and
then written to disk in 2 pushes (header + data), instead of streaming
everything.
This is *always* faster, even for big files (since the git_filebuf class
still does streaming writes when the memory cache overflows). This is
also a gazillion lines of code smaller, because we don't have to
precompute the final size of the object before starting the stream (this
was kind of defeating the point of streaming, anyway).
Blobs are still written with full streaming instead of loading them in
memory, since this is still the fastest way.
A new `git_buf` class has been added. It's missing some features, but
it'll get there.
|
|
27df4275
|
2011-06-28T14:13:12
|
|
reflog: add API to read or write a reference log
So far libgit2 didn't support reference logs (reflog). Add a new
git_reflog_* API for basic reading and writing of reflogs:
* git_reflog_read
* git_reflog_write
* git_reflog_free
Signed-off-by: schu <schu-github@schulog.org>
|
|
6d4f090d
|
2011-07-07T17:49:55
|
|
reference_renaming: add additional tests
Add some more test checking forced reference renaming.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Acked-by: schu <schu-github@schulog.org>
|
|
2b5af615
|
2011-07-07T13:47:45
|
|
tag: add pattern based retrieval of list of tag names
|
|
c1e85748
|
2011-07-07T12:23:47
|
|
test-core: Fix warning in uniq test
|
|
bdcc4611
|
2011-07-07T10:11:00
|
|
Fix MSVC compilation warnings
|