]> git.proxmox.com Git - libgit2.git/log
libgit2.git
13 years agofileops: Fix 'GetFinalPathNameByHandleA' in old platforms
Vicent Marti [Fri, 17 Jun 2011 17:08:06 +0000 (19:08 +0200)]
fileops: Fix 'GetFinalPathNameByHandleA' in old platforms

13 years agoMerge pull request #263 from carlosmn/refs-writing
Vicent Martí [Thu, 16 Jun 2011 15:01:47 +0000 (08:01 -0700)]
Merge pull request #263 from carlosmn/refs-writing

Simplify loose ref writing

13 years agoSimplify loose ref writing
Carlos Martín Nieto [Thu, 16 Jun 2011 14:39:20 +0000 (16:39 +0200)]
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>
13 years agoUpdate documentation
Vicent Marti [Thu, 16 Jun 2011 01:02:46 +0000 (03:02 +0200)]
Update documentation

Fix all the missmatched arguments in the docs

13 years agooid: Uniformize ncmp methods
Vicent Marti [Thu, 16 Jun 2011 00:48:48 +0000 (02:48 +0200)]
oid: Uniformize ncmp methods

Drop redundant methods. The ncmp method is now public

13 years agooid: Rename methods
Vicent Marti [Thu, 16 Jun 2011 00:36:21 +0000 (02:36 +0200)]
oid: Rename methods

Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.

13 years agorefs: Rename git_referece_listcb to _foreach
Vicent Marti [Thu, 16 Jun 2011 00:27:43 +0000 (02:27 +0200)]
refs: Rename git_referece_listcb to _foreach

Same name as `git_config_foreach`

13 years agoMerge pull request #248 from carlosmn/config
Vicent Martí [Thu, 16 Jun 2011 00:24:04 +0000 (17:24 -0700)]
Merge pull request #248 from carlosmn/config

Implement config writing

13 years agoAdd method to get the compiled version of the lib
Vicent Marti [Thu, 16 Jun 2011 00:21:33 +0000 (02:21 +0200)]
Add method to get the compiled version of the lib

13 years agoMerge pull request #261 from Romain-Geissler/discovery-path-v2
Vicent Martí [Wed, 15 Jun 2011 20:47:41 +0000 (13:47 -0700)]
Merge pull request #261 from Romain-Geissler/discovery-path-v2

Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.

13 years agoFix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
Romain Geissler [Wed, 15 Jun 2011 10:36:08 +0000 (12:36 +0200)]
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.

GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so
that it's can be used by a client.

13 years agoMerge pull request #251 from nulltoken/fix/msvc-warnings
Vicent Martí [Wed, 15 Jun 2011 19:15:11 +0000 (12:15 -0700)]
Merge pull request #251 from nulltoken/fix/msvc-warnings

Fix compilation warnings in MSVC

13 years agoMerge pull request #260 from nulltoken/fix/git_index_add
Vicent Martí [Wed, 15 Jun 2011 19:11:59 +0000 (12:11 -0700)]
Merge pull request #260 from nulltoken/fix/git_index_add

Fix git_index_add()

13 years agogit_index_add: enforce test coverage
nulltoken [Wed, 15 Jun 2011 14:06:20 +0000 (16:06 +0200)]
git_index_add: enforce test coverage

13 years agoblob: Fix git_blob_create_fromfile()
nulltoken [Wed, 15 Jun 2011 14:05:33 +0000 (16:05 +0200)]
blob: Fix git_blob_create_fromfile()

13 years agoAdd mode_t definition in MSVC compat layer
nulltoken [Wed, 15 Jun 2011 15:04:11 +0000 (17:04 +0200)]
Add mode_t definition in MSVC compat layer

13 years agoMerge pull request #259 from schu/nitpicky-markdown
Vicent Martí [Wed, 15 Jun 2011 17:39:20 +0000 (10:39 -0700)]
Merge pull request #259 from schu/nitpicky-markdown

README.md: do not break syntax highlighting

13 years agoupdate examples content to be compilable and up to date
Scott Chacon [Wed, 15 Jun 2011 16:38:55 +0000 (09:38 -0700)]
update examples content to be compilable and up to date

13 years agoREADME.md: do not break syntax highlighting
schu [Wed, 15 Jun 2011 12:08:43 +0000 (14:08 +0200)]
README.md: do not break syntax highlighting

Signed-off-by: schu <schu-github@schulog.org>
13 years agofix the example urls
Scott Chacon [Tue, 14 Jun 2011 22:15:11 +0000 (15:15 -0700)]
fix the example urls

13 years agoadd examples for docs
Scott Chacon [Tue, 14 Jun 2011 16:27:46 +0000 (09:27 -0700)]
add examples for docs

13 years agoreplace stupid doxygen
Scott Chacon [Tue, 14 Jun 2011 15:17:53 +0000 (08:17 -0700)]
replace stupid doxygen

13 years agoAdd CTest support for CI
Vicent Marti [Tue, 14 Jun 2011 18:00:06 +0000 (20:00 +0200)]
Add CTest support for CI

13 years agofix gid_ misspelling
Scott Chacon [Tue, 14 Jun 2011 16:31:19 +0000 (09:31 -0700)]
fix gid_ misspelling

13 years agoPort MSVC specific Waf compilation flags to CMake and remove dynamic dependence to...
Em [Tue, 14 Jun 2011 13:37:10 +0000 (06:37 -0700)]
Port MSVC specific Waf compilation flags to CMake and remove dynamic dependence to msvcr100.dll on Windows

The '/MT' and '/MTd' flags replace the dynamic link to 'msvcr100.dll' with a static link to 'libcmt.lib'. This has the nice effect to ease the deployment of libgit2 by removing the dependence on 'msvcr100.dll' which is not deployed by default on Windows.

13 years agoUpdate README.md
Vicent Marti [Tue, 14 Jun 2011 15:36:38 +0000 (17:36 +0200)]
Update README.md

13 years agobuild: Cleanup CMake
Vicent Marti [Mon, 13 Jun 2011 20:33:32 +0000 (22:33 +0200)]
build: Cleanup CMake

13 years agobuild: Drop waf support
Vicent Marti [Mon, 13 Jun 2011 13:34:34 +0000 (15:34 +0200)]
build: Drop waf support

Goodbye Waf. It's been a long ride.

13 years agoRemove custom backends
Vicent Marti [Sun, 12 Jun 2011 09:40:14 +0000 (11:40 +0200)]
Remove custom backends

All the custom backend code will be moved to a separate project,
together with the new MySQL backend.

13 years agoMerge pull request #258 from carlosmn/no-arpa
Vicent Martí [Tue, 14 Jun 2011 15:28:03 +0000 (08:28 -0700)]
Merge pull request #258 from carlosmn/no-arpa

Remove uneeded arpa/inet.h include

13 years agoRemove uneeded arpa/inet.h include
Carlos Martín Nieto [Tue, 14 Jun 2011 14:35:57 +0000 (16:35 +0200)]
Remove uneeded arpa/inet.h include

This header isn't needed at all and it shows a lot of warnings on
OpenBSD.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoTest replacing a value
Carlos Martín Nieto [Tue, 14 Jun 2011 12:26:08 +0000 (14:26 +0200)]
Test replacing a value

Add a test to check that value replacement works.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoIndent config variables with tags
Carlos Martín Nieto [Tue, 14 Jun 2011 11:08:30 +0000 (13:08 +0200)]
Indent config variables with tags

Confg variables are indended using tags and not four spaces as was
being done by the code.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoFix filebuf0 test which was failing on Windows
nulltoken [Wed, 8 Jun 2011 20:15:49 +0000 (22:15 +0200)]
Fix filebuf0 test which was failing on Windows

13 years agoFix compilation warnings in MSVC
nulltoken [Wed, 8 Jun 2011 18:39:38 +0000 (20:39 +0200)]
Fix compilation warnings in MSVC

13 years agouse proper in-memory database for sqlite3 tests
Brian Lopez [Sun, 12 Jun 2011 05:05:26 +0000 (22:05 -0700)]
use proper in-memory database for sqlite3 tests

13 years agoMerge pull request #253 from sschuberth/msvc10-fixes
Vicent Martí [Sat, 11 Jun 2011 18:56:10 +0000 (11:56 -0700)]
Merge pull request #253 from sschuberth/msvc10-fixes

Msvc10 fixes

13 years agoAdd missing function declarations to avoid MSVC compiler warnings
Sebastian Schuberth [Fri, 10 Jun 2011 12:00:54 +0000 (14:00 +0200)]
Add missing function declarations to avoid MSVC compiler warnings

The better solution would probably be to turn the gitfo_lstat /
gitfo_readlink macros into real functions that wrap either lstat or
gitfo_lstat__w32 (and readlink or gitfo_readlink__w32). However, that
would introduce an indirection unless inlined. For now, this is the less
intrusive change.

13 years agoUse "__inline" instead of "inline" with MSVC
Sebastian Schuberth [Fri, 10 Jun 2011 11:57:01 +0000 (13:57 +0200)]
Use "__inline" instead of "inline" with MSVC

MSVC supports "inline" only in C++ code, not in C code.

13 years agoPrefer to use file mode defines instead of raw numbers
Sebastian Schuberth [Fri, 10 Jun 2011 11:56:24 +0000 (13:56 +0200)]
Prefer to use file mode defines instead of raw numbers

13 years agoPrefer to use S_IFLNK instead of _S_IFLNK for consistency
Sebastian Schuberth [Fri, 10 Jun 2011 11:54:47 +0000 (13:54 +0200)]
Prefer to use S_IFLNK instead of _S_IFLNK for consistency

13 years agoAdd some missing MSVC compatibility defines
Sebastian Schuberth [Fri, 10 Jun 2011 11:54:25 +0000 (13:54 +0200)]
Add some missing MSVC compatibility defines

13 years agoMerge pull request #216 from glesserd/development
Vicent Martí [Wed, 8 Jun 2011 15:11:26 +0000 (08:11 -0700)]
Merge pull request #216 from glesserd/development

git_tag_create{,_o,_frombuffer} correction and improvement

13 years agoMerge pull request #250 from pegonma/commit_short_message
Vicent Martí [Wed, 8 Jun 2011 15:09:54 +0000 (08:09 -0700)]
Merge pull request #250 from pegonma/commit_short_message

Commit short message should be the same as git's

13 years agowindows: Fix Symlink issues
Vicent Marti [Wed, 8 Jun 2011 15:03:41 +0000 (17:03 +0200)]
windows: Fix Symlink issues

Handle Symlinks if they can be handled in Win32. This is not even
compiled. Needs review.

The lstat implementation is modified from core Git.
The readlink implementation is modified from PHP.

13 years agoMerge pull request #246 from carlosmn/keep-lock
Vicent Martí [Wed, 8 Jun 2011 11:16:47 +0000 (04:16 -0700)]
Merge pull request #246 from carlosmn/keep-lock

Keep the lockfile if we fail to lock it

13 years agoChanged commit short messages so that they match git log --oneline output.
Marc Pegon [Wed, 8 Jun 2011 09:16:31 +0000 (11:16 +0200)]
Changed commit short messages so that they match git log --oneline output.

In git, the short message of a commit is the part of the commit message before 2 consecutive line breaks. In the short message, line breaks are replaced by space characters.

13 years agoconfig: implement config writing
Carlos Martín Nieto [Tue, 17 May 2011 14:39:09 +0000 (16:39 +0200)]
config: implement config writing

After each variable gets set, we store it in our list (not completely
in the right position, but the close enough). Then we write out the
new config file in the same way that git.git does it (keep the rest of
the file intact and insert or replace the variable in its line).

Overwriting variables and adding new ones is supported (even on new
sections), though deleting isn't yet.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoconfig: store new variables with the internal representation of the section
Carlos Martín Nieto [Tue, 7 Jun 2011 21:32:14 +0000 (23:32 +0200)]
config: store new variables with the internal representation of the section

The section name should be stored in its case-sensitive variant when
we are adding a new variable. Use the internalize_section function to
do just that.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoRemove an unfortunate optimisation from cvar_match_section
Carlos Martín Nieto [Tue, 7 Jun 2011 20:49:13 +0000 (22:49 +0200)]
Remove an unfortunate optimisation from cvar_match_section

The (rather late) early-exit code, which provides a negligible
optimisation causes cvar_match_section to return false negatives when
it's called with a section name instead of a full variable name.

Remove this optimisation.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agofilebuf cleanup: only unlink lockfile if we've opened it
Carlos Martín Nieto [Tue, 7 Jun 2011 15:03:07 +0000 (17:03 +0200)]
filebuf cleanup: only unlink lockfile if we've opened it

Add a check for the file descriptor in git_filebuf_cleanup. Without
it, an existing lockfile would be deleted if we tried to acquire it
(but failed, as the lockfile already existed).

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoAdd test for git_filebuf_open error code
Carlos Martín Nieto [Tue, 7 Jun 2011 14:51:31 +0000 (16:51 +0200)]
Add test for git_filebuf_open error code

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoMerge pull request #243 from jpfender/symlinks2
Vicent Martí [Tue, 7 Jun 2011 14:07:45 +0000 (07:07 -0700)]
Merge pull request #243 from jpfender/symlinks2

Symlinks NEW

13 years agoMerge pull request #245 from schu/use-normalized
Vicent Martí [Tue, 7 Jun 2011 14:04:51 +0000 (07:04 -0700)]
Merge pull request #245 from schu/use-normalized

rename-reference: use normalized path

13 years agoMerge pull request #244 from carlosmn/config-bugfix
Vicent Martí [Tue, 7 Jun 2011 14:04:20 +0000 (07:04 -0700)]
Merge pull request #244 from carlosmn/config-bugfix

config: update the git_config_add_file documentation

13 years agoMerge pull request #241 from nulltoken/fix/msvc-warnings
Vicent Martí [Tue, 7 Jun 2011 14:03:37 +0000 (07:03 -0700)]
Merge pull request #241 from nulltoken/fix/msvc-warnings

Fix compilation warnings in MSVC

13 years agoMerge pull request #242 from schu/fix-unused-2
Vicent Martí [Tue, 7 Jun 2011 14:03:14 +0000 (07:03 -0700)]
Merge pull request #242 from schu/fix-unused-2

fileops.c: fix unused warning v2

13 years agoconfig: explain the cfg and file relationship better
Carlos Martín Nieto [Tue, 7 Jun 2011 13:39:40 +0000 (15:39 +0200)]
config: explain the cfg and file relationship better

It's not clear how git_config and git_config_file relate to one
another. Be more explicit about their relationship in the function
documentation.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agoconfig: update the git_config_add_file documentation
Carlos Martín Nieto [Tue, 7 Jun 2011 12:18:22 +0000 (14:18 +0200)]
config: update the git_config_add_file documentation

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
13 years agorename-reference: use normalized path
schu [Tue, 7 Jun 2011 12:18:20 +0000 (14:18 +0200)]
rename-reference: use normalized path

Signed-off-by: schu <schu-github@schulog.org>
13 years agoExport gitfo_shallow_exists
Jakob Pfender [Tue, 7 Jun 2011 12:15:55 +0000 (14:15 +0200)]
Export gitfo_shallow_exists

13 years agofileops: Allow differentiation between deep and shallow exists()
Jakob Pfender [Tue, 7 Jun 2011 12:10:06 +0000 (14:10 +0200)]
fileops: Allow differentiation between deep and shallow exists()

When calling gitfo_exists() on a symbolic link, sometimes we need to
simply check whether the link exists and sometimes we need to check
whether the file pointed to by the symlink exists.

Introduce a new function gitfo_shallow_exists that only checks if the
link exists and revert gitfo_exists to the original functionality of
checking whether the file pointed to by the link exists.

13 years agoRevert "common: Include stat.h in include/git2/common.h instead of src/common.h"
Jakob Pfender [Tue, 7 Jun 2011 09:15:23 +0000 (11:15 +0200)]
Revert "common: Include stat.h in include/git2/common.h instead of src/common.h"

This reverts commit df1c98ab6d6171ed63729195bd190b54b67fe530.

As 8a27b6b reverts the exposition of struct stat to the external API, we
do not need - indeed, do not want - struct stat to be in the outer
include layer.

13 years agoblob: Stat path inside git_blob_create_fromfile
Jakob Pfender [Tue, 7 Jun 2011 09:11:09 +0000 (11:11 +0200)]
blob: Stat path inside git_blob_create_fromfile

00582bc introduced a change that required the caller of
git_blob_create_fromfile() to pass a struct stat with the stat
information for the file. Several developers pointed out that this would
make life hard for the bindings developers as struct stat isn't widely
supported by other languages.

Make git_blob_create_fromfile() stat the path itself, eliminating the
need for the file to be stat'ed by the caller. This makes
index_init_entry() more costly as the file will be stat'ed twice but
makes life easier for everyone else.

13 years agocommon: Include stat.h in include/git2/common.h instead of src/common.h
Jakob Pfender [Wed, 25 May 2011 14:31:14 +0000 (16:31 +0200)]
common: Include stat.h in include/git2/common.h instead of src/common.h

00582bcb introduced a change to git_blob_create_fromfile() that required
the caller to pass a stat struct. This means that we need to include
stat.h higher in the hierarchy of includes.

13 years agoindex: Correctly write entry mode
Jakob Pfender [Wed, 25 May 2011 14:16:41 +0000 (16:16 +0200)]
index: Correctly write entry mode

The entry mode flags for an entry created from a path name were not
correctly written if the entry was a symlink. The st_mode of a statted
symlink is 0120777, however git requires the mode to read 0120000,
because it does not care about permissions of symlinks.

Introduce index_create_mode() that correctly writes the mode flags in
the form expected by git.

13 years agoindex/fileops: Correctly process symbolic links
Jakob Pfender [Wed, 25 May 2011 14:11:57 +0000 (16:11 +0200)]
index/fileops: Correctly process symbolic links

gitfo_exists() used to error out if the given file was a symbolic link,
due to access() returning an error code. This is not expected behaviour,
as gitfo_exists() should only check whether the file itself exists, not
its link target if it is a symbolic link.

Fix this by calling gitfo_lstat() instead, which is just a wrapper for
lstat().

Also fix the same error in index_init_entry().

13 years agoblob: Require stat information for git_blob_create_fromfile()
Jakob Pfender [Wed, 25 May 2011 14:04:29 +0000 (16:04 +0200)]
blob: Require stat information for git_blob_create_fromfile()

In order to be able to write symlinks with git_blob_create_fromfile(),
we need to check whether the file to be written is a symbolic link or
not. Since the calling function of git_blob_create_fromfile() is likely to have
stated the file before calling, we make it pass the stat.

The reason for this is that writing symbolic link blobs is significantly
different from writing ordinary files - we do not want to open the link
destination but instead want to write the link itself, regardless of
whether it exists or not.

Previously, index_init_entry() used to error out if the file to be added
was a symlink that pointed to a nonexistent file. Fix this behaviour to
add the file regardless of whether it exists. This mimics git.git's
behaviour.

13 years agoFix the error pointed out by tanoku.
David Glesser [Tue, 7 Jun 2011 08:15:31 +0000 (10:15 +0200)]
Fix the error pointed out by tanoku.

Now the code shoulb be c89.

13 years agoFix compilation warnings in MSVC
nulltoken [Tue, 7 Jun 2011 06:41:33 +0000 (08:41 +0200)]
Fix compilation warnings in MSVC

13 years agothreads: Cleanup TLS declarations
Vicent Marti [Tue, 7 Jun 2011 01:39:19 +0000 (03:39 +0200)]
threads: Cleanup TLS declarations

This time for good.

13 years agoRevert "threads: Fix TLS declarations"
Vicent Marti [Tue, 7 Jun 2011 01:38:09 +0000 (03:38 +0200)]
Revert "threads: Fix TLS declarations"

This commit uploaded an old broken test. Oops!

13 years agoMerge pull request #240 from Romain-Geissler/tree-object-type
Vicent Martí [Tue, 7 Jun 2011 01:33:38 +0000 (18:33 -0700)]
Merge pull request #240 from Romain-Geissler/tree-object-type

Tree: Added a function that returns the type of a tree entry.

13 years agoMerge pull request #239 from pegonma/oid_prefix
Vicent Martí [Tue, 7 Jun 2011 01:31:21 +0000 (18:31 -0700)]
Merge pull request #239 from pegonma/oid_prefix

Search objects of different types given OID prefix

13 years agoMerge pull request #238 from pegonma/git_oid_ncmp
Vicent Martí [Tue, 7 Jun 2011 01:28:11 +0000 (18:28 -0700)]
Merge pull request #238 from pegonma/git_oid_ncmp

Better name for git_oid_match

13 years agoMerge pull request #236 from Jopie64/development
Vicent Martí [Tue, 7 Jun 2011 01:27:29 +0000 (18:27 -0700)]
Merge pull request #236 from Jopie64/development

Fix build errors on MSVC

13 years agoMerge pull request #234 from Romain-Geissler/entry-count-API-uniformisation
Vicent Martí [Tue, 7 Jun 2011 01:26:50 +0000 (18:26 -0700)]
Merge pull request #234 from Romain-Geissler/entry-count-API-uniformisation

[Tree | Index] API uniformisation

13 years agoMerge pull request #232 from schu/ref-available-cb
Vicent Martí [Tue, 7 Jun 2011 01:24:37 +0000 (18:24 -0700)]
Merge pull request #232 from schu/ref-available-cb

reference_rename: respect all references v2

13 years agothreads: Fix TLS declarations
Vicent Marti [Tue, 7 Jun 2011 01:22:32 +0000 (03:22 +0200)]
threads: Fix TLS declarations

Cleanup the thread-utils file. Do not define TLS if libgit2 is not
threadsafe.

13 years agoMerge pull request #231 from Romain-Geissler/discovery-path-v2
Vicent Martí [Tue, 7 Jun 2011 01:11:15 +0000 (18:11 -0700)]
Merge pull request #231 from Romain-Geissler/discovery-path-v2

[Discovery path] Fix and tests

13 years agoTree: Added a function that returns the type of a tree entry.
Romain Geissler [Mon, 6 Jun 2011 15:14:30 +0000 (17:14 +0200)]
Tree: Added a function that returns the type of a tree entry.

13 years agoRenamed git_oid_match to git_oid_ncmp.
Marc Pegon [Mon, 6 Jun 2011 08:55:36 +0000 (10:55 +0200)]
Renamed git_oid_match to git_oid_ncmp.
As suggested by carlosmn, git_oid_ncmp would probably
be a better name than git_oid_match, for it does the same
as git_oid_cmp but only up to a certain amount of hex digits.

13 years agofileops.c: fix unused warning
schu [Mon, 6 Jun 2011 10:17:58 +0000 (12:17 +0200)]
fileops.c: fix unused warning

Signed-off-by: schu <schu-github@schulog.org>
13 years agoAdded methods to search objects of different types
Marc Pegon [Mon, 6 Jun 2011 09:55:48 +0000 (11:55 +0200)]
Added methods to search objects of different types
given an OID prefix.

13 years agoTree: Some more size_t to unsigned int type change.
Romain Geissler [Mon, 6 Jun 2011 08:55:54 +0000 (10:55 +0200)]
Tree: Some more size_t to unsigned int type change.

13 years agoRepository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile...
Romain Geissler [Mon, 6 Jun 2011 08:02:07 +0000 (10:02 +0200)]
Repository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile is malformed and GIT_ENOTAREPO when the pointed dir is not a repo.
Fixed tests so that it check the right error code.

13 years agofilebuf: Fix printf buffer overflows
Vicent Marti [Sun, 5 Jun 2011 23:54:59 +0000 (01:54 +0200)]
filebuf: Fix printf buffer overflows

The filebuf was not being properly written after a flush. This should
cut it now.

Fixes #228

13 years agorefs: Improve error messages
Vicent Marti [Sun, 5 Jun 2011 23:54:25 +0000 (01:54 +0200)]
refs: Improve error messages

13 years agoRepository: Fixed retrieve_device return type.
Romain Geissler [Sun, 5 Jun 2011 23:26:01 +0000 (01:26 +0200)]
Repository: Fixed retrieve_device return type.

13 years agoFix build errors on MSVC
Johan 't Hart [Sun, 5 Jun 2011 22:33:23 +0000 (00:33 +0200)]
Fix build errors on MSVC

13 years agoIndex: API uniformisation: Use unsigned int for all index number.
Romain Geissler [Sun, 5 Jun 2011 19:19:03 +0000 (21:19 +0200)]
Index: API uniformisation: Use unsigned int for all index number.

Feature Added: Search an unmerged entry by path (git_index_get_unmerged
renamed to git_index_get_unmerged_bypath) or by index (git_index_get_unmerged_byindex).

13 years agoTree: API uniformasation: Use unsigned int for all index number.
Romain Geissler [Sun, 5 Jun 2011 19:18:05 +0000 (21:18 +0200)]
Tree: API uniformasation: Use unsigned int for all index number.

13 years agoRaise GIT_EEXISTS in case of conflicting ref names instead of passing
schu [Sun, 5 Jun 2011 18:47:30 +0000 (20:47 +0200)]
Raise GIT_EEXISTS in case of conflicting ref names instead of passing
the error returned by the subsystem; clarify error message.

Fix tiny typo.

Signed-off-by: schu <schu-github@schulog.org>
13 years agoTeach reference_rename() to really respect other references
schu [Sun, 5 Jun 2011 17:22:32 +0000 (19:22 +0200)]
Teach reference_rename() to really respect other references

Add a new function reference_available() to check if a reference name
actually is free and can be used.

Signed-off-by: schu <schu-github@schulog.org>
13 years agoAdd test case checking we do not corrupt the repository when renaming
schu [Sun, 29 May 2011 20:36:26 +0000 (22:36 +0200)]
Add test case checking we do not corrupt the repository when renaming

Signed-off-by: schu <schu-github@schulog.org>
13 years agoTests: Added tests for git_repository_discover.
Romain Geissler [Sat, 4 Jun 2011 22:23:24 +0000 (00:23 +0200)]
Tests: Added tests for git_repository_discover.

Unfortunately, the across_fs flag can't be tested automaticly, as we can't
create a temporary new filesystem.

13 years agoFileops: Fixed gitfo_mkdir_recurs so that it proprely works with a path without trail...
Romain Geissler [Sat, 4 Jun 2011 22:20:35 +0000 (00:20 +0200)]
Fileops: Fixed gitfo_mkdir_recurs so that it proprely works with a path without trailing slash.

It used to discard the last directory if the path didn't have a trailing slash.

13 years agoRepository: Fixed the path returned by read_gitfile (remove trailing slashes)
Romain Geissler [Sat, 4 Jun 2011 22:18:34 +0000 (00:18 +0200)]
Repository: Fixed the path returned by read_gitfile (remove trailing slashes)

13 years agoRepository: Fixed a bug in read_gitfile (proprely remove trailings newlines)
Romain Geissler [Sat, 4 Jun 2011 22:17:26 +0000 (00:17 +0200)]
Repository: Fixed a bug in read_gitfile (proprely remove trailings newlines)

13 years agorepository: Export all internal paths
Vicent Marti [Sat, 4 Jun 2011 18:44:14 +0000 (20:44 +0200)]
repository: Export all internal paths