Commit Graph

1149 Commits

Author SHA1 Message Date
Vicent Marti
ec62685345 zlib: Declare preprocessor directives at build time 2011-07-01 17:34:27 +02:00
Vicent Marti
17d523041d build: Simplify build structure
This will make libgit2 more suitable for embedding.
2011-07-01 17:26:23 +02:00
Vicent Marti
b2cef77ccf common: Force 64 bit fileops at compile time 2011-06-30 22:28:19 +02:00
Vicent Marti
8a0620030c zlib: No visualization attributes.
The visibility attribute is a headache on many platforms like Solaris,
and not even supported on Windows.
2011-06-30 22:28:19 +02:00
Vicent Marti
637edc9c42 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.
2011-06-30 22:28:19 +02:00
Vicent Marti
e0fc39da9a config: Fix unmatched parameters in docs 2011-06-30 22:28:19 +02:00
Vicent Martí
1f61e301be Merge pull request #287 from kiryl/development
filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
2011-06-30 07:12:42 -07:00
Vicent Martí
02bc2d2f27 Merge pull request #288 from nulltoken/patch-4
GIT_EXTERN'd  head_detached() and head_orphan()
2011-06-30 07:11:04 -07:00
nulltoken
408d733b1f repository: Make head_detached() and head_orphan() convenience methods accessible to bindings 2011-06-30 06:56:58 -07:00
Kirill A. Shutemov
fe5babacd6 filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-06-30 16:19:19 +03:00
Vicent Martí
2dfc08875a Merge pull request #284 from nulltoken/topic/hide-git-dir
Hide ".git" directory on Windows upon creation of a non bare repository
2011-06-29 12:14:29 -07:00
nulltoken
6ac91dfe52 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.
2011-06-29 19:22:24 +02:00
Vicent Marti
cfef5fb779 config: foreach now returns variable values too 2011-06-29 15:09:21 +02:00
Vicent Marti
7376ad9927 refs: Remove duplicate rename method
`git_reference_rename` now takes a `force` flag
2011-06-29 11:01:35 +02:00
Carlos Martín Nieto
5f25149e46 sig: allow empty names
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-28 22:04:27 +02:00
Vicent Marti
0f489fb211 repo: Fix git_repository_is_empty 2011-06-28 21:30:38 +02:00
Vicent Marti
ab7941b5d9 test: Properly show error messages 2011-06-28 21:10:51 +02:00
Vicent Marti
5cf1f909e4 test: Print last error message properly 2011-06-28 21:10:49 +02:00
Vicent Marti
c682886e8e repo: Rename HEAD-related methods 2011-06-28 21:10:44 +02:00
Vicent Marti
e053c911cf 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.
2011-06-28 19:52:41 +02:00
Vicent Martí
ccd59372d4 Merge pull request #279 from carlosmn/detached-orphan
Add detached and orphan convenience functions
2011-06-28 10:44:19 -07:00
Vicent Marti
9525e47df9 refs: Remove unused declarations 2011-06-28 19:43:36 +02:00
Vicent Martí
2fb520f19a Merge pull request #277 from schu/sign-compare
Fix warning: signed and unsigned type in cond expr
2011-06-28 10:39:07 -07:00
Vicent Marti
d5afc0390c 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.
2011-06-28 19:36:27 +02:00
Carlos Martín Nieto
f5e09d6080 Add tests for detached and orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-28 16:59:51 +02:00
Carlos Martín Nieto
35502d2ec4 Add git_repository_is_detached, git_repository_is_orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-28 16:59:51 +02:00
schu
7b608b3b96 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>
2011-06-27 12:37:46 +02:00
Vicent Martí
0b10c9ea6e Merge pull request #276 from carlosmn/development
Bring back GCC flags
2011-06-26 08:33:11 -07:00
Carlos Martín Nieto
e233fa6f17 Bring back GCC flags
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 16:37:04 +02:00
Vicent Marti
ce90d81f6f revwalk: Do not set error string on revwalk over 2011-06-24 15:30:10 +02:00
Vicent Marti
8172dd4383 cmake: Do not pass /Tc to MSVC 2011-06-23 22:45:09 +02:00
Vicent Martí
45e82ba21b Merge pull request #273 from GeneralMaximus/development
added defines for Haiku in types.h
2011-06-23 04:38:38 -07:00
Ankur Sethi
2c0ec236e9 added defines for Haiku in types.h 2011-06-23 13:36:09 +00:00
Vicent Marti
3101a3e5b8 refs: Do not overflow when normalizing refnames 2011-06-23 02:29:11 +02:00
Vicent Martí
3bf3ad9f03 Merge pull request #269 from schu/infinite-append
gitfo_read: fix read-loop
2011-06-21 13:53:48 -07:00
Vicent Martí
b3f2d4cb36 Merge pull request #270 from carlosmn/valgrind
Two memory access fixes
2011-06-21 07:24:57 -07:00
Carlos Martín Nieto
4cea2f0369 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>
2011-06-20 17:53:21 +02:00
Carlos Martín Nieto
cdb6f9bf5e 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>
2011-06-20 17:34:01 +02:00
schu
28f7869dee gitfo_read: fix read-loop
Signed-off-by: schu <schu-github@schulog.org>
2011-06-20 17:28:59 +02:00
schu
24bd5e556b Add test case checking GIT_FILEBUF_APPEND
Signed-off-by: schu <schu-github@schulog.org>
2011-06-20 15:58:56 +02:00
Vicent Marti
37172582ec 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
2011-06-19 12:51:09 +02:00
Vicent Marti
984ed6b6be odb: Add GIT_EPASSTHROUGH
Allows a custom user backend to passthrough one of the callbacks. Used
for e.g. caching backends.
2011-06-19 12:50:45 +02:00
Vicent Marti
bfd5e3e2a2 config: Fix API docs 2011-06-19 12:50:45 +02:00
Vicent Martí
8ee2bb54ec Merge pull request #268 from nulltoken/patch-3
Fix link to API documentation
2011-06-19 03:50:19 -07:00
nulltoken
e49020e0bb Fix link to API documentation 2011-06-18 09:07:51 -07:00
Vicent Marti
e35e9fb4c3 mingw: Fix compilation 2011-06-18 13:23:19 +02:00
Vicent Marti
2a406ab51c config: Fix sorting of repository config files 2011-06-18 02:08:56 +02:00
Vicent Marti
19cb6857a4 config: Bring back git_config_open_global
Scott commands, I obey.
2011-06-18 01:50:48 +02:00
Vicent Marti
920e000d38 config: Update examples 2011-06-18 01:17:58 +02:00
Vicent Marti
dbe70bd5c3 config: Fix compilation in MSVC 2011-06-18 01:12:58 +02:00