|
6f2b0a3a
|
2011-07-05T12:00:18
|
|
examples/general: fix misc warnings
examples/general.c:393:25: warning: unused variable ‘reftarget’ [-Wunused-variable]
examples/general.c:357:19: warning: unused variable ‘e’ [-Wunused-variable]
examples/general.c:444:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
d6d877d2
|
2011-07-05T11:54:16
|
|
examples/general: fix warnings on not handled reference type in switch
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_INVALID’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_PACKED’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_HAS_PEEL’ not handled in switch [-Wswitch]
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_LISTALL’ not handled in switch [-Wswitch]
Signe-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
51cc50a3
|
2011-07-05T11:43:21
|
|
examples/general: fix git_commit_create_v() arguments type
general.c:208: warning: passing argument 7 of 'git_commit_create_v' from incompatible pointer type
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
7d69f788
|
2011-06-28T16:48:04
|
|
Add variable writing tests
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
156af801
|
2011-06-28T16:27:16
|
|
Add test for section header at end of file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
2601fcfc
|
2011-06-28T15:21:44
|
|
Add tests for deleting a config var
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
f58c53ce
|
2011-06-28T16:24:51
|
|
Correctly detect truncated input in header parsing
If the section header is the last line in the file,
parse_section_header would incorrectly decide that the input had been
truncated.
Fix this by checking whether the actual input line is correctly
formatted.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
86b5ab16
|
2011-06-28T16:08:46
|
|
git_config_add_file should rethrow
Otherwise, the information about why there was an error gets lost.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
6d4b6097
|
2011-06-28T15:20:42
|
|
Add git_config_del to delete a variable
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
9f86ec52
|
2011-07-05T02:28:18
|
|
signature: Fix warnings
Add extra braces to avoid ambiguous if-else.
Also, free() doesn't need a check.
|
|
a01acc47
|
2011-07-03T14:03:43
|
|
signature: straighten the creation of a signature
- Fails on empty name and/or email
- Trims leading and trailing spaces of name and email
|
|
42a1b5e1
|
2011-07-01T17:59:10
|
|
signature: enhance relaxed parsing of bogus signatures
Final fix for issue #278
|
|
60caf024
|
2011-06-28T17:06:06
|
|
t04-commit: add tests for git_signature__parse
git_signature__parse used to be very strict about what's a well-formed
signature. Add tests checking git_signature__parse can stick with
"unexpected" signatures (IOW no author name and / or no email, etc).
Signed-off-by: schu <schu-github@schulog.org>
|
|
8b2c913a
|
2011-06-29T14:48:09
|
|
git_signature__parse: make parsing less strict
git_signature__parse used to be very strict about what's a well-formed
signature. Since git_signature__parse is used only when reading already
existing signatures, we should not care about if it's a valid signature
too much but rather show what we got.
Reported-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
1bc83ff1
|
2011-07-05T01:33:39
|
|
repository: Cleanup initialization
|
|
eec3fe39
|
2011-07-05T01:11:33
|
|
fileutils: Finish dropping the old `prettify_path`
|
|
19ac1ed7
|
2011-07-04T21:33:26
|
|
fileops: Fix stat() on directories for W32
The `stat` methods were having issues when called with a trailing slash
in Windows platforms.
We now use GetFileAttributes() where possible, which doesn't have this
restriction.
|
|
5ad739e8
|
2011-07-04T20:05:11
|
|
fileops: Drop `git_fileops_prettify_path`
The old `git_fileops_prettify_path` has been replaced with
`git_path_prettify`. This is a much simpler method that uses the OS's
`realpath` call to obtain the full path for directories and resolve
symlinks.
The `realpath` syscall is the original POSIX call in Unix system and
an emulated version under Windows using the Windows API.
|
|
f79026b4
|
2011-07-04T11:43:34
|
|
fileops: Cleanup
Cleaned up the structure of the whole OS-abstraction layer.
fileops.c now contains a set of utility methods for file management used
by the library. These are abstractions on top of the original POSIX
calls.
There's a new file called `posix.c` that contains
emulations/reimplementations of all the POSIX calls the library uses.
These are prefixed with `p_`. There's a specific posix file for each
platform (win32 and unix).
All the path-related methods have been moved from `utils.c` to `path.c`
and have their own prefix.
|
|
678e9e04
|
2011-07-03T13:33:43
|
|
build: Move OS-specific compat to their own folders
|
|
932d1baf
|
2011-06-30T19:52:34
|
|
cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
1f4f4d17
|
2011-07-01T17:39:03
|
|
cmake: Use system zlib if found on non-Windows systems
|
|
ec626853
|
2011-07-01T17:34:27
|
|
zlib: Declare preprocessor directives at build time
|
|
17d52304
|
2011-07-01T17:26:23
|
|
build: Simplify build structure
This will make libgit2 more suitable for embedding.
|
|
b2cef77c
|
2011-06-30T21:29:42
|
|
common: Force 64 bit fileops at compile time
|
|
8a062003
|
2011-06-30T21:10:16
|
|
zlib: No visualization attributes.
The visibility attribute is a headache on many platforms like Solaris,
and not even supported on Windows.
|
|
637edc9c
|
2011-06-30T20:53:59
|
|
refs: Remove bogus assertion
The assertion in line 360 was there to check that only loose refs were
being written as loose, but there are times when we need to re-write a
packed reference as loose.
|
|
e0fc39da
|
2011-06-29T15:11:34
|
|
config: Fix unmatched parameters in docs
|
|
1f61e301
|
2011-06-30T07:12:42
|
|
Merge pull request #287 from kiryl/development
filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
|
|
02bc2d2f
|
2011-06-30T07:11:04
|
|
Merge pull request #288 from nulltoken/patch-4
GIT_EXTERN'd head_detached() and head_orphan()
|
|
408d733b
|
2011-06-30T06:56:58
|
|
repository: Make head_detached() and head_orphan() convenience methods accessible to bindings
|
|
fe5babac
|
2011-06-30T00:16:23
|
|
filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
2dfc0887
|
2011-06-29T12:14:29
|
|
Merge pull request #284 from nulltoken/topic/hide-git-dir
Hide ".git" directory on Windows upon creation of a non bare repository
|
|
6ac91dfe
|
2011-06-29T14:06:18
|
|
Hide ".git" directory on Windows upon creation of a non bare repository
Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
|
|
cfef5fb7
|
2011-06-29T15:09:21
|
|
config: `foreach` now returns variable values too
|
|
7376ad99
|
2011-06-29T11:01:35
|
|
refs: Remove duplicate rename method
`git_reference_rename` now takes a `force` flag
|
|
5f25149e
|
2011-06-28T22:04:27
|
|
sig: allow empty names
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
0f489fb2
|
2011-06-28T21:30:15
|
|
repo: Fix git_repository_is_empty
|
|
ab7941b5
|
2011-06-28T21:04:59
|
|
test: Properly show error messages
|
|
5cf1f909
|
2011-06-28T20:27:38
|
|
test: Print last error message properly
|
|
c682886e
|
2011-06-28T21:09:22
|
|
repo: Rename HEAD-related methods
|
|
e053c911
|
2011-06-28T19:52:41
|
|
commit: Allow spaces inside email addresses
Core Git doesn't care when people use spaces in the email address, even
though this kind of foolery receives the capital punishment in several
states of the USA.
We must obey.
|
|
ccd59372
|
2011-06-28T10:44:19
|
|
Merge pull request #279 from carlosmn/detached-orphan
Add detached and orphan convenience functions
|
|
9525e47d
|
2011-06-28T19:43:36
|
|
refs: Remove unused declarations
|
|
2fb520f1
|
2011-06-28T10:39:07
|
|
Merge pull request #277 from schu/sign-compare
Fix warning: signed and unsigned type in cond expr
|
|
d5afc039
|
2011-06-28T19:15:48
|
|
Remove redundant methods from the API
A bunch of redundant methods have been removed from the external API.
- All the reference/tag creation methods with `_f` are gone. The force
flag is now passed as an argument to the normal create methods.
- All the different commit creation methods are gone; commit creation
now always requires a `git_commit` pointer for parents and a `git_tree`
pointer for tree, to ensure that corrupted commits cannot be generated.
- All the different tag creation methods are gone; tag creation now
always requires a `git_object` pointer to ensure that tags are not
created to inexisting objects.
|
|
f5e09d60
|
2011-06-28T14:11:24
|
|
Add tests for detached and orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
35502d2e
|
2011-06-28T13:55:00
|
|
Add git_repository_is_detached, git_repository_is_orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
7b608b3b
|
2011-06-26T17:57:40
|
|
git_blob_create_fromfile: remove old code
Remove call of gitfo_size, since we call gitfo_lstat anyway; remove some
old workaround code for gitfo_read, which is obsolete now.
Signed-off-by: schu <schu-github@schulog.org>
|
|
0b10c9ea
|
2011-06-26T08:33:11
|
|
Merge pull request #276 from carlosmn/development
Bring back GCC flags
|
|
e233fa6f
|
2011-06-26T16:37:04
|
|
Bring back GCC flags
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
ce90d81f
|
2011-06-24T15:30:10
|
|
revwalk: Do not set error string on revwalk over
|
|
8172dd43
|
2011-06-23T22:45:09
|
|
cmake: Do not pass `/Tc` to MSVC
|
|
2c0ec236
|
2011-06-23T13:36:09
|
|
added defines for Haiku in types.h
|
|
45e82ba2
|
2011-06-23T04:38:38
|
|
Merge pull request #273 from GeneralMaximus/development
added defines for Haiku in types.h
|
|
3101a3e5
|
2011-06-23T02:28:29
|
|
refs: Do not overflow when normalizing refnames
|
|
3bf3ad9f
|
2011-06-21T13:53:48
|
|
Merge pull request #269 from schu/infinite-append
gitfo_read: fix read-loop
|
|
b3f2d4cb
|
2011-06-21T07:24:57
|
|
Merge pull request #270 from carlosmn/valgrind
Two memory access fixes
|
|
4cea2f03
|
2011-06-20T17:53:21
|
|
Stat files with full pathnames
Call gitfo_lstat with the full pathname instead of the relative one,
which fails in case the current working directory is different from
the workdir.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
cdb6f9bf
|
2011-06-20T17:34:01
|
|
Allocate enough memory for the terminator in commit parsing
Also allow space for the null-terminator when allocating the buffer in
packfile_unpack_compressed. Up to now, the last newline had served as
a terminator, but 858ef372 searches for a double-newline and exposes
the problem.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
28f7869d
|
2011-06-20T17:25:13
|
|
gitfo_read: fix read-loop
Signed-off-by: schu <schu-github@schulog.org>
|
|
24bd5e55
|
2011-06-20T10:40:21
|
|
Add test case checking GIT_FILEBUF_APPEND
Signed-off-by: schu <schu-github@schulog.org>
|
|
37172582
|
2011-06-18T21:14:55
|
|
libgit2 v0.13.0 "Watermelon Wheat"
On this rascalicious minor release of libgit2:
- We've dropped support for Waf. All the build process is now managed
through CMake for all platforms.
- We've removed the custom backends from the repository. You can now
find a collection of Custom backends on their own repo, under the
libgit2 org. Including MySQL and Memcache backends, courtesy of the
beardful Brian Lopez.
- We are rocking a new documentation system, Docurium, courtesy of the
insightful Scott Chacon. Check out the details for each single method
in our external API and the way they've evolved through the history
of the library:
http://libgit2.github.com/libgit2/
This will certainly come in handy if you are developing bindings for
the library.
- You can now check the linked version of the library from your
application or bindings, using `git_libgit2_version`.
- We have a gazillion new features, courtesy of our invaluable
collaborators, including:
* Support for Config files!
* Support for prefix-only reads on the ODB
* Repository discovery
* Support for the Unmerged Entries index extension
* Better Windows support
* 30.000 bug fixes (actual number may be lower)
Thanks as always to everyone who makes this project possible.
Here's the full list of all external API changes:
- git_index_open_bare
- git_index_open_inrepo
- git_odb_backend_sqlite
- git_oid_mkraw
- git_oid_mkstr
- git_reference_listcb
- git_repository_workdir
= git_index_get
= git_repository_path
= git_tree_entry_byindex
+ git_blob_lookup_prefix
+ git_commit_lookup_prefix
+ git_config_add_file
+ git_config_add_file_ondisk
+ git_config_file__ondisk
+ git_config_find_global
+ git_config_foreach
+ git_config_free
+ git_config_get_bool
+ git_config_get_int
+ git_config_get_long
+ git_config_get_string
+ git_config_new
+ git_config_open_global
+ git_config_open_ondisk
+ git_config_set_bool
+ git_config_set_int
+ git_config_set_long
+ git_config_set_string
+ git_index_entry_stage
+ git_index_entrycount_unmerged
+ git_index_get_unmerged_byindex
+ git_index_get_unmerged_bypath
+ git_index_open
+ git_object_lookup_prefix
+ git_odb_read_prefix
+ git_oid_fromraw
+ git_oid_fromstr
+ git_oid_ncmp
+ git_reference_foreach
+ git_repository_config
+ git_repository_discover
+ git_repository_is_bare
+ git_tag_lookup_prefix
+ git_tree_entry_type
+ git_tree_lookup_prefix
|
|
984ed6b6
|
2011-06-19T12:48:16
|
|
odb: Add GIT_EPASSTHROUGH
Allows a custom user backend to passthrough one of the callbacks. Used
for e.g. caching backends.
|
|
bfd5e3e2
|
2011-06-18T15:07:41
|
|
config: Fix API docs
|
|
8ee2bb54
|
2011-06-19T03:50:19
|
|
Merge pull request #268 from nulltoken/patch-3
Fix link to API documentation
|
|
e49020e0
|
2011-06-18T09:07:51
|
|
Fix link to API documentation
|
|
e35e9fb4
|
2011-06-18T13:23:19
|
|
mingw: Fix compilation
|
|
2a406ab5
|
2011-06-18T02:08:56
|
|
config: Fix sorting of repository config files
|
|
19cb6857
|
2011-06-18T01:50:48
|
|
config: Bring back `git_config_open_global`
Scott commands, I obey.
|
|
920e000d
|
2011-06-18T01:17:58
|
|
config: Update examples
|
|
dbe70bd5
|
2011-06-18T01:12:58
|
|
config: Fix compilation in MSVC
|
|
40070445
|
2011-06-18T00:54:24
|
|
config: Typorrrrl
|
|
deee4766
|
2011-06-17T15:44:26
|
|
Merge pull request #267 from Jopie64/development
Fix compilation error in MSVC when compiling for c++
|
|
07ff8817
|
2011-06-18T00:39:39
|
|
config: Cleanup external API
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
|
|
f0619886
|
2011-06-07T22:09:22
|
|
Fix compilation error in MSVC when compiling for c++
|
|
f3dad3ac
|
2011-06-16T20:06:36
|
|
Add fall-back support to the configuration
If a config has several files, we need to check all of them before we
can say that a variable doesn't exist.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
3de5df7d
|
2011-06-16T19:56:48
|
|
Add a test for overriding config
The repo's configuration should take precedence over the global one.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
9ba9e513
|
2011-06-16T19:54:37
|
|
Parse the repo's configuration when we load it
It's not enough to load the config, we also need to explicitely parse
it after we create it.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
b22d1479
|
2011-06-16T17:46:06
|
|
Add git_repository_config API
This function puts the global and repository configurations in one
git_config object and gives it to the user.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
b76934de
|
2011-06-16T16:55:11
|
|
Remove double-space
Noticed by txdv
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
c716b187
|
2011-06-17T19:47:58
|
|
config: Fix unitialized variable warning
|
|
f0890fcc
|
2011-06-17T19:40:51
|
|
cmake: Build shared library by default
|
|
e01f7f64
|
2011-06-17T19:27:11
|
|
windows: Disable Runtime checks
Runtime checks are asserting on the embedded ZLib code because of
truncation (see zlib/trees.c:218). This is not good or pretty, but I'm
wary about patching the ZLib code even more.
There are two ways to fix this:
- Patch the ZLib code, and start storing a diff/patchset on
how does our version of ZLib differ from the original one, so we can
be more or less on sync when new version of ZLib.
- Go back to ZLib as an external dependency, which is np for *NIX
users but annoying as dicks for Windows users.
THINK HARD
|
|
f252d479
|
2011-06-17T10:32:42
|
|
Merge pull request #264 from nulltoken/patch-2
Fix misleading comment in CMake build script
|
|
2414d000
|
2011-06-17T10:32:22
|
|
Merge pull request #266 from carlosmn/valgrind
Plug memory leaks
|
|
02285482
|
2011-06-17T19:19:30
|
|
fileops: Cast the GetProcAddress value
|
|
9c11bd0a
|
2011-06-17T19:08:06
|
|
fileops: Fix 'GetFinalPathNameByHandleA' in old platforms
|
|
3d5a02b6
|
2011-06-16T20:30:40
|
|
Plug an index leak
The test wasn't updated when repos lost ownership of indices
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
038d2fc3
|
2011-06-16T20:24:51
|
|
Plug leaks in the repo discovery tests
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
b2e361cc
|
2011-06-16T20:22:05
|
|
Plug two leaks in config writing
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
3d96996d
|
2011-06-16T08:10:25
|
|
Fix misleading comment in CMake build script
|
|
cb75ffea
|
2011-06-16T08:01:47
|
|
Merge pull request #263 from carlosmn/refs-writing
Simplify loose ref writing
|
|
e7e0e20f
|
2011-06-16T16:39:20
|
|
Simplify loose ref writing
There is no need to store the format outselves, as the library
provides git_filebuf_printf which takes care of the formatting itself.
Also get rid of an use of strcat + strcpy which is always a nice
thing.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
d144c569
|
2011-06-16T03:02:46
|
|
Update documentation
Fix all the missmatched arguments in the docs
|
|
f1d01851
|
2011-06-16T02:48:48
|
|
oid: Uniformize ncmp methods
Drop redundant methods. The ncmp method is now public
|
|
fa48608e
|
2011-06-16T02:36:21
|
|
oid: Rename methods
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
|
|
43521d06
|
2011-06-16T02:27:43
|
|
refs: Rename git_referece_listcb to _foreach
Same name as `git_config_foreach`
|
|
607d1643
|
2011-06-15T17:24:04
|
|
Merge pull request #248 from carlosmn/config
Implement config writing
|
|
536955f9
|
2011-06-16T02:21:33
|
|
Add method to get the compiled version of the lib
|