]> git.proxmox.com Git - libgit2.git/log
libgit2.git
12 years agoIntroduce GITERR_INDEXER
Carlos Martín Nieto [Tue, 15 May 2012 19:42:01 +0000 (21:42 +0200)]
Introduce GITERR_INDEXER

12 years agoMerge pull request #699 from nulltoken/fix/compilation-warnings
Vicent Martí [Mon, 14 May 2012 20:28:13 +0000 (13:28 -0700)]
Merge pull request #699 from nulltoken/fix/compilation-warnings

Fix compilation warnings

12 years agoFix compilation warnings
nulltoken [Mon, 14 May 2012 20:24:58 +0000 (22:24 +0200)]
Fix compilation warnings

12 years agoMerge pull request #696 from nulltoken/topic/notes-list
Vicent Martí [Mon, 14 May 2012 20:17:19 +0000 (13:17 -0700)]
Merge pull request #696 from nulltoken/topic/notes-list

Add git_note_foreach()

12 years agoRevert "Specifiy dllimport to MSVC if we're not building libgit2.dll"
Vicent Martí [Mon, 14 May 2012 20:15:53 +0000 (22:15 +0200)]
Revert "Specifiy dllimport to MSVC if we're not building libgit2.dll"

This reverts commit 1093e2de22f6ca245b09d758a3510899a8362048.

12 years agonotes: add git_notes_foreach()
nulltoken [Tue, 8 May 2012 15:58:40 +0000 (17:58 +0200)]
notes: add git_notes_foreach()

12 years agoMerge pull request #693 from nulltoken/topic/enhance_branch_move_test_coverage
Vicent Martí [Mon, 14 May 2012 18:25:55 +0000 (11:25 -0700)]
Merge pull request #693 from nulltoken/topic/enhance_branch_move_test_coverage

branch: cover with test that moving a non existing branch returns ENOTFOUND

12 years agoMerge pull request #692 from nulltoken/fix/delete-branch_ENOTFOUND
Vicent Martí [Mon, 14 May 2012 18:25:40 +0000 (11:25 -0700)]
Merge pull request #692 from nulltoken/fix/delete-branch_ENOTFOUND

branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist

12 years agoMerge pull request #688 from hanwen/master
Vicent Martí [Mon, 14 May 2012 18:24:37 +0000 (11:24 -0700)]
Merge pull request #688 from hanwen/master

See issue https://github.com/libgit2/libgit2/issues/680

12 years agoSpecifiy dllimport to MSVC if we're not building libgit2.dll
Sascha Cunz [Fri, 11 May 2012 02:25:23 +0000 (04:25 +0200)]
Specifiy dllimport to MSVC if we're not building libgit2.dll

Building a "shared object" (DLL) in Windows includes 2 steps:

- specify __declspec(dllexport)
  when building the library itself. MSVC will disallow itself from
  optimizing these symbols out and reference them in the PE's
  Exports-Table.
  Further, a static link library will be generated. This library
  contains the symbols which are exported via the declsepc above.
  The __declspec(dllexport) becomes part of the symbol-signature
  (like parameter types in C++ are 'mangled' into the symbol name,
  the export specifier is mingled with the name)

- specify __declspec(dllimport)
  when using the library. This again mingles the declspec into the
  name and declares the function / variable with external linkage.

cmake automatically adds -Dgit2_EXPORTS to the compiler arguments
when compiling the libgit2 project.
The 'git2' is the name specified via PROJECT() in CMakeLists.txt.

12 years agoMerge pull request #671 from nulltoken/topic/blob_create_fromdisk
Vicent Martí [Mon, 14 May 2012 18:03:30 +0000 (11:03 -0700)]
Merge pull request #671 from nulltoken/topic/blob_create_fromdisk

Add git_blob_create_fromdisk()

12 years agoMerge pull request #681 from scottjg/solaris-fixes
Vicent Martí [Mon, 14 May 2012 18:01:14 +0000 (11:01 -0700)]
Merge pull request #681 from scottjg/solaris-fixes

Fix build/runtime issues on Solaris

12 years agoMerge pull request #682 from arrbee/attribute-cache-buster
Vicent Martí [Mon, 14 May 2012 17:58:23 +0000 (10:58 -0700)]
Merge pull request #682 from arrbee/attribute-cache-buster

Attribute cache buster

12 years agoAdd missing GIT_EXTERN declarations
Sascha Cunz [Fri, 11 May 2012 02:12:18 +0000 (04:12 +0200)]
Add missing GIT_EXTERN declarations

12 years agoMerge pull request #689 from scunz/visibility-gcc
Vicent Martí [Mon, 14 May 2012 17:50:20 +0000 (10:50 -0700)]
Merge pull request #689 from scunz/visibility-gcc

Use -fvisibility=hidden in GCC builds

12 years agoMerge pull request #694 from nulltoken/topic/mergebase-test-coverage
Vicent Martí [Mon, 14 May 2012 17:49:42 +0000 (10:49 -0700)]
Merge pull request #694 from nulltoken/topic/mergebase-test-coverage

mergebase: enhance test code coverage

12 years agoMerge pull request #695 from nulltoken/topic/iterator_free_null_tolerant
Russell Belfer [Mon, 14 May 2012 16:37:13 +0000 (09:37 -0700)]
Merge pull request #695 from nulltoken/topic/iterator_free_null_tolerant

iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator

12 years agoAdd a test to verify FILENAME_MAX
Scott J. Goldman [Mon, 14 May 2012 06:12:51 +0000 (23:12 -0700)]
Add a test to verify FILENAME_MAX

Since we now rely on it (at least under Solaris), I figured we probably
want to make sure it's accurate. The new test makes sure that creating a
file with a name of length FILENAME_MAX+1 fails.

12 years agoiterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator
nulltoken [Sun, 13 May 2012 17:09:25 +0000 (19:09 +0200)]
iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator

12 years agomergebase: enhance test code coverage
nulltoken [Sun, 13 May 2012 10:21:00 +0000 (12:21 +0200)]
mergebase: enhance test code coverage

12 years agotests: make sure we clean up in objects/blob/write.c
Carlos Martín Nieto [Mon, 7 May 2012 09:48:39 +0000 (11:48 +0200)]
tests: make sure we clean up in objects/blob/write.c

12 years agoblob: Add git_blob_create_fromdisk()
nulltoken [Sun, 6 May 2012 19:00:20 +0000 (21:00 +0200)]
blob: Add git_blob_create_fromdisk()

This function will create blobs in the object database from files anywhere on the filesystem. This can be run against bare and non-bare repositories.

12 years agobranch: cover with test that moving a non existing branch returns ENOTFOUND
nulltoken [Sun, 13 May 2012 09:03:29 +0000 (11:03 +0200)]
branch: cover with test that moving a non existing branch returns ENOTFOUND

12 years agobranch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
nulltoken [Sun, 13 May 2012 08:17:52 +0000 (10:17 +0200)]
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist

12 years agoHandle duplicate objects from different backends in git_odb_read_prefix().
Han-Wen Nienhuys [Sat, 12 May 2012 18:01:39 +0000 (15:01 -0300)]
Handle duplicate objects from different backends in git_odb_read_prefix().

12 years agoFix readdir_r() usage for Solaris
Scott J. Goldman [Thu, 10 May 2012 06:45:55 +0000 (23:45 -0700)]
Fix readdir_r() usage for Solaris

On Solaris, struct dirent is defined differently than Linux. The field
containing the path name is of size 0, rather than NAME_MAX. So, we need to
use a properly sized buffer on Solaris to avoid a stack overflow.

Also fix some DIR* leaks on cleanup.

12 years agoUse -fvisibility=hidden in GCC builds
Sascha Cunz [Sat, 12 May 2012 09:12:42 +0000 (11:12 +0200)]
Use -fvisibility=hidden in GCC builds

12 years agoMerge pull request #683 from arrbee/better-repo-init
Vicent Martí [Sat, 12 May 2012 08:51:58 +0000 (01:51 -0700)]
Merge pull request #683 from arrbee/better-repo-init

Improve repo initialization to be more like git

12 years agoMerge pull request #687 from nulltoken/fix/object-lookup-take-2
Vicent Martí [Sat, 12 May 2012 08:42:21 +0000 (01:42 -0700)]
Merge pull request #687 from nulltoken/fix/object-lookup-take-2

object: make git_object_lookup() return GIT_ENOTFOUND - The sequel

12 years agoobject: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing...
nulltoken [Fri, 11 May 2012 21:56:23 +0000 (23:56 +0200)]
object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type

This fix complements cb0ce16bbe8efe2098ef9cfffcf158301b036565 and cover the following additional use cases

 - retrieving an object which has been previously searched, found and cached
 - retrieving an object through an non ambiguous abbreviated id

12 years agoexamples: fix an oopsie
Carlos Martín Nieto [Fri, 11 May 2012 19:49:33 +0000 (21:49 +0200)]
examples: fix an oopsie

12 years agoFixed leaks and added tests
Russell Belfer [Fri, 11 May 2012 19:16:19 +0000 (12:16 -0700)]
Fixed leaks and added tests

12 years agoFix comment typo in common.h
Scott J. Goldman [Fri, 11 May 2012 00:16:24 +0000 (17:16 -0700)]
Fix comment typo in common.h

12 years agoFix rmdir() usage on Solaris
Scott J. Goldman [Thu, 10 May 2012 07:37:03 +0000 (00:37 -0700)]
Fix rmdir() usage on Solaris

On Solaris, rmdir() throws EEXIST if the folder is not empty, so just add
one more case to check for that, alongside ENOTEMPTY.

12 years agoFixed mode on clar
Russell Belfer [Thu, 10 May 2012 18:15:37 +0000 (11:15 -0700)]
Fixed mode on clar

12 years agoAdd cache busting to attribute cache
Russell Belfer [Thu, 10 May 2012 18:08:59 +0000 (11:08 -0700)]
Add cache busting to attribute cache

This makes the git attributes and git ignores cache check
stat information before using the file contents from the
cache.  For cached files from the index, it checks the SHA
of the file instead.  This should reduce the need to ever
call `git_attr_cache_flush()` in most situations.

This commit also fixes the `git_status_should_ignore` API
to use the libgit2 standard parameter ordering.

12 years agoHook up Windows compat fnmatch() for Solaris
Scott J. Goldman [Thu, 10 May 2012 05:30:57 +0000 (22:30 -0700)]
Hook up Windows compat fnmatch() for Solaris

Since Solaris does not support some of the same flags as glibc fnmatch(),
we just use the implementation we have for Windows.

Now that it's no longer a windows-specific thing, I moved it into compat/
instead of win32/

12 years agoexamples: update network examples error handling
Carlos Martín Nieto [Thu, 10 May 2012 14:52:12 +0000 (16:52 +0200)]
examples: update network examples error handling

Use giterr_last() and make sure it's not NULL.

12 years agoclar: Update from upstream
Vicent Martí [Wed, 9 May 2012 20:54:24 +0000 (22:54 +0200)]
clar: Update from upstream

12 years agoMerge pull request #678 from nulltoken/fix/msvc-weird-error
Vicent Martí [Wed, 9 May 2012 19:34:13 +0000 (12:34 -0700)]
Merge pull request #678 from nulltoken/fix/msvc-weird-error

Fix MSVC compilation issue

12 years agoFix MSVC compilation issue
nulltoken [Wed, 9 May 2012 19:14:49 +0000 (21:14 +0200)]
Fix MSVC compilation issue

    exp() is already defined in math.h. This leads to LMSVC complaining

    ..\..\libgit2\tests-clar\diff\blob.c(5): error C2365: 'exp' : redefinition; previous definition was 'function'

    Renaming the variable fixes this issue.

12 years agoImprove repo initialization to be more like git
Russell Belfer [Tue, 8 May 2012 20:50:40 +0000 (13:50 -0700)]
Improve repo initialization to be more like git

This adds a bunch of template files to the initialization for
hooks, info/exclude, and description.  This makes our initialized
repo look more like core gits.

12 years agoFix 64-bit build warning
Russell Belfer [Wed, 9 May 2012 17:30:34 +0000 (10:30 -0700)]
Fix 64-bit build warning

12 years agoMerge pull request #679 from nulltoken/fix/git__isspace
Russell Belfer [Wed, 9 May 2012 17:18:54 +0000 (10:18 -0700)]
Merge pull request #679 from nulltoken/fix/git__isspace

util: Fix git__isspace() implementation

12 years agotests-clar/diff: fix missing-prototype warning
Michael Schubert [Wed, 9 May 2012 16:01:23 +0000 (18:01 +0200)]
tests-clar/diff: fix missing-prototype warning

12 years agofetch: filter tag annotation pseudo-refs while generating wants
Carlos Martín Nieto [Wed, 9 May 2012 14:18:13 +0000 (16:18 +0200)]
fetch: filter tag annotation pseudo-refs while generating wants

These objects aren't considered as being advertised, so asking for
them will cause the remote end to close the connection. This makes the
checking in update_tips() unnecessary, because they don't get inserted
in the list.

12 years agoremote: don't try to create tag annotations as refs/tags/v0.1.0^{}
Carlos Martín Nieto [Wed, 9 May 2012 12:10:30 +0000 (14:10 +0200)]
remote: don't try to create tag annotations as refs/tags/v0.1.0^{}

Skip them for now. Eventually we might want to filter these out
earler.

12 years agoutil: Fix git__isspace() implementation
nulltoken [Wed, 9 May 2012 11:21:21 +0000 (13:21 +0200)]
util: Fix git__isspace() implementation

The characters <space>, <form-feed>, <newline>, <carriage-return>, <tab>, and <vertical-tab> are part of the "space" definition.

cf. http://www.kernel.org/doc/man-pages/online/pages/man5/locale.5.html

12 years agoindexer: close the pack's fd before renaming it
Carlos Martín Nieto [Wed, 9 May 2012 11:11:50 +0000 (13:11 +0200)]
indexer: close the pack's fd before renaming it

Windows gets upset if we rename a file with an open descriptor.

12 years agomsvc: Do not use `isspace`
Vicent Martí [Wed, 9 May 2012 02:37:02 +0000 (04:37 +0200)]
msvc: Do not use `isspace`

Locale-aware bullshit bitting my ass again yo

12 years agoMerge pull request #677 from arrbee/status-without-head
Vicent Martí [Tue, 8 May 2012 23:06:27 +0000 (16:06 -0700)]
Merge pull request #677 from arrbee/status-without-head

Add support for diffing index with no HEAD

12 years agoAdd support for diffing index with no HEAD
Russell Belfer [Tue, 8 May 2012 22:03:59 +0000 (15:03 -0700)]
Add support for diffing index with no HEAD

When a repo is first created, there is no HEAD yet and attempting
to diff files in the index was showing nothing because a tree
iterator could not be constructed.  This adds an "empty" iterator
and falls back on that when the head cannot be looked up.

12 years agomessage: Cleanup
Vicent Martí [Tue, 8 May 2012 21:55:37 +0000 (23:55 +0200)]
message: Cleanup

12 years agomessage: Proper OOM handling
Vicent Martí [Tue, 8 May 2012 21:43:52 +0000 (23:43 +0200)]
message: Proper OOM handling

12 years agoMerge pull request #670 from nulltoken/ntk/topic/clean-commit_message
Vicent Martí [Tue, 8 May 2012 21:13:43 +0000 (14:13 -0700)]
Merge pull request #670 from nulltoken/ntk/topic/clean-commit_message

Clean commit and tag messages

12 years agoMerge pull request #668 from nulltoken/topic/binary-blobs
Russell Belfer [Tue, 8 May 2012 20:56:21 +0000 (13:56 -0700)]
Merge pull request #668 from nulltoken/topic/binary-blobs

Enhancing the blob diffing experience

12 years agoMerge pull request #676 from carlosmn/remotes
Vicent Martí [Tue, 8 May 2012 20:42:11 +0000 (13:42 -0700)]
Merge pull request #676 from carlosmn/remotes

Add git_remote_add() and change signature for _new()

12 years agoClean up warnings and tests
Russell Belfer [Tue, 8 May 2012 20:23:00 +0000 (13:23 -0700)]
Clean up warnings and tests

12 years agoremotes: change git_remote_new's signature
Carlos Martín Nieto [Thu, 3 May 2012 18:25:56 +0000 (20:25 +0200)]
remotes: change git_remote_new's signature

Add a fetch refspec arguemnt and make the arguments (name, url,
refspec), as that order makes more sense.

12 years agoremote: add git_remote_add()
Carlos Martín Nieto [Thu, 3 May 2012 14:08:33 +0000 (16:08 +0200)]
remote: add git_remote_add()

Helper function to create a remote with the default settings

12 years agoconfig: don't use freed memory on error
Carlos Martín Nieto [Thu, 3 May 2012 14:07:22 +0000 (16:07 +0200)]
config: don't use freed memory on error

Change the order and set a NULL so we don't try to access freed memory
in case of an error.

12 years agoMerge pull request #674 from nulltoken/topic/GIT_ENOTFOUND
Russell Belfer [Tue, 8 May 2012 17:40:01 +0000 (10:40 -0700)]
Merge pull request #674 from nulltoken/topic/GIT_ENOTFOUND

Improve the interop with bindings

12 years agoMinor error fixes
Carlos Martín Nieto [Tue, 8 May 2012 12:28:21 +0000 (14:28 +0200)]
Minor error fixes

Clear the error in pkt when we notice that the remote is starting to
send the packfile.

Fix the format string for Windows networking errors.

12 years agostatus: Prevent git_status_file() from returning ENOTFOUND when not applicable
nulltoken [Mon, 7 May 2012 19:21:48 +0000 (21:21 +0200)]
status: Prevent git_status_file() from returning ENOTFOUND when not applicable

12 years agorepository: ensure git_repository_discover() returns ENOTFOUND when unable to find...
nulltoken [Mon, 7 May 2012 15:25:16 +0000 (17:25 +0200)]
repository: ensure git_repository_discover() returns ENOTFOUND when unable to find a repository given the constraints

12 years agofileops: replace integer usage with more explicit enum in some git_futils_rmdir_r...
nulltoken [Mon, 7 May 2012 15:04:06 +0000 (17:04 +0200)]
fileops: replace integer usage with more explicit enum in some git_futils_rmdir_r() calls

12 years agorepository: ensure git_repository_open() returns ENOTFOUND when being passed a path...
nulltoken [Mon, 7 May 2012 14:16:08 +0000 (16:16 +0200)]
repository: ensure git_repository_open() returns ENOTFOUND when being passed a path leading to no repository

12 years agocompat: make p_realpath Windows implementation be a bit more POSIX compliant and...
nulltoken [Mon, 7 May 2012 11:58:01 +0000 (13:58 +0200)]
compat: make p_realpath Windows implementation be a bit more POSIX compliant and fail if the provided path does not lead to an existing entry

12 years agopath: Make git_path_prettify() properly handle ENOTDIR errno value
nulltoken [Mon, 7 May 2012 11:56:42 +0000 (13:56 +0200)]
path: Make git_path_prettify() properly handle ENOTDIR errno value

12 years agoobject: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing...
nulltoken [Mon, 7 May 2012 13:42:13 +0000 (15:42 +0200)]
object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type

12 years agoremote: make git_remote_load() return GIT_ENOTFOUND when the remote url cannot be...
nulltoken [Mon, 7 May 2012 08:57:34 +0000 (10:57 +0200)]
remote: make git_remote_load() return GIT_ENOTFOUND when the remote url cannot be retrieved from the config file

12 years agoremote: ensure the allocated remote is freed when an error occurs during its loading
nulltoken [Mon, 7 May 2012 08:04:50 +0000 (10:04 +0200)]
remote: ensure the allocated remote is freed when an error occurs during its loading

12 years agoMerge pull request #672 from scottjg/more-mingw32-fixes
Vicent Martí [Mon, 7 May 2012 20:36:02 +0000 (13:36 -0700)]
Merge pull request #672 from scottjg/more-mingw32-fixes

More mingw32 compilation fixes.

12 years agoFix directory finding for attrs
Russell Belfer [Mon, 7 May 2012 20:30:27 +0000 (13:30 -0700)]
Fix directory finding for attrs

The fix to support attrs on bare repos went a little too far
in trying to avoid using the working directory and ended up
not processing the input path quite correctly.

12 years agoMerge pull request #667 from nulltoken/fix/p_open
Russell Belfer [Mon, 7 May 2012 17:20:49 +0000 (10:20 -0700)]
Merge pull request #667 from nulltoken/fix/p_open

compat: make p_open able to accept optional mode when passing the O_CREAT flag

12 years agotravis: run the tests verbosely
Carlos Martín Nieto [Mon, 7 May 2012 10:31:31 +0000 (12:31 +0200)]
travis: run the tests verbosely

12 years agocompat: make p_open able to accept optional mode when passing the O_CREAT flag
nulltoken [Sun, 6 May 2012 11:04:12 +0000 (13:04 +0200)]
compat: make p_open able to accept optional mode when passing the O_CREAT flag

This has the nice side effect of making test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives() test pass again on Windows. This test started to fail after commit 674a198 was applied.

12 years agodiff: improve git_diff_blobs() documentation
nulltoken [Thu, 3 May 2012 20:21:08 +0000 (22:21 +0200)]
diff: improve git_diff_blobs() documentation

12 years agodiff: fix the diffing of two identical blobs
nulltoken [Fri, 4 May 2012 05:55:09 +0000 (07:55 +0200)]
diff: fix the diffing of two identical blobs

12 years agodiff: make git_diff_blobs() able to detect binary blobs
nulltoken [Thu, 3 May 2012 15:25:01 +0000 (17:25 +0200)]
diff: make git_diff_blobs() able to detect binary blobs

12 years agotests: add two binary blobs to attr test repository
nulltoken [Thu, 3 May 2012 14:11:40 +0000 (16:11 +0200)]
tests: add two binary blobs to attr test repository

 - edf3dce -> assets.github.com/images/icons/emoji/alien.png?v5
 - de863bf -> assets.github.com/images/icons/emoji/heart.png?v5

12 years agodiff: fix the diffing of a concrete blob against a null one
nulltoken [Thu, 3 May 2012 15:19:06 +0000 (17:19 +0200)]
diff: fix the diffing of a concrete blob against a null one

12 years agodiff: When diffing two blobs, ensure the delta callback parameter is filled with...
nulltoken [Thu, 3 May 2012 14:34:02 +0000 (16:34 +0200)]
diff: When diffing two blobs, ensure the delta callback parameter is filled with relevant information

12 years agodiff: remove unused parameter
nulltoken [Thu, 3 May 2012 14:27:22 +0000 (16:27 +0200)]
diff: remove unused parameter

12 years agocommit/tag: ensure the message is cleaned up
nulltoken [Thu, 1 Mar 2012 16:03:32 +0000 (17:03 +0100)]
commit/tag: ensure the message is cleaned up

'git commit' and 'git tag -a' enforce some conventions, like cleaning up excess whitespace and making sure that the last line ends with a '\n'. This fix replicates this behavior.

Fix libgit2/libgit2sharp#117

12 years agoclar helper: don't dereference giterr_last() if it's NULL
Carlos Martín Nieto [Mon, 7 May 2012 09:28:26 +0000 (11:28 +0200)]
clar helper: don't dereference giterr_last() if it's NULL

It can cause segfaults if the call didn't set an error

12 years agoDefine explicit _WIN32_WINNT version in makefile
Scott J. Goldman [Mon, 7 May 2012 07:05:02 +0000 (00:05 -0700)]
Define explicit _WIN32_WINNT version in makefile

Previously, it was defined in netops.c, but it's also needed in one of the
clar tests, so I figured we might as well just make it global for the
whole project.

Without it, the mingw32 linker won't resolve GetProcessId() (called from
the core/errors.c clar test) because of some conditionals in windows.h.

12 years agoUpdate clar to latest version
Scott J. Goldman [Mon, 7 May 2012 06:58:41 +0000 (23:58 -0700)]
Update clar to latest version

Fixes the mingw32 build issues.

12 years agotransport git: don't use 'error' uninitialized
Carlos Martín Nieto [Sun, 6 May 2012 11:17:25 +0000 (13:17 +0200)]
transport git: don't use 'error' uninitialized

12 years agocompat: Add `stdarg.h` include
Vicent Martí [Sun, 6 May 2012 05:14:02 +0000 (22:14 -0700)]
compat: Add `stdarg.h` include

12 years agoMerge remote-tracking branch 'scottjg/fix-mingw32' into development
Vicent Martí [Sat, 5 May 2012 23:47:20 +0000 (16:47 -0700)]
Merge remote-tracking branch 'scottjg/fix-mingw32' into development

Conflicts:
src/netops.c
src/netops.h
src/transports/http.c
tests-clar/clar

12 years agoMerge pull request #659 from libgit2/development-merge
Vicent Martí [Sat, 5 May 2012 21:22:53 +0000 (14:22 -0700)]
Merge pull request #659 from libgit2/development-merge

New-error-handling

12 years agoMerge pull request #664 from arrbee/attrs-from-index
Vicent Martí [Sat, 5 May 2012 21:22:06 +0000 (14:22 -0700)]
Merge pull request #664 from arrbee/attrs-from-index

Support git attrs from index (and bare repo)

12 years agonotes: Cleanup error handling
Vicent Martí [Sat, 5 May 2012 21:18:10 +0000 (14:18 -0700)]
notes: Cleanup error handling

12 years agoMerge pull request #663 from schu/notes-honor-config
Vicent Martí [Sat, 5 May 2012 21:14:58 +0000 (14:14 -0700)]
Merge pull request #663 from schu/notes-honor-config

Honor core.notesRef config option

12 years agoFix unsigned/signed comparison on Windows in commitstagedfile.c
Scott J. Goldman [Sat, 5 May 2012 20:54:33 +0000 (13:54 -0700)]
Fix unsigned/signed comparison on Windows in commitstagedfile.c

12 years agoFix missing prototype warning in utf-conv.c
Scott J. Goldman [Sat, 5 May 2012 20:52:48 +0000 (13:52 -0700)]
Fix missing prototype warning in utf-conv.c

12 years agoFix gitno_connect() error handling on Windows
Scott J. Goldman [Sat, 5 May 2012 20:30:33 +0000 (13:30 -0700)]
Fix gitno_connect() error handling on Windows

gitno_connect() can return an error or socket, which is fine on most
platforms where sockets are file descriptors (signed int), but on Windows,
SOCKET is an unsigned type, which is problematic when we are trying to
test if the socket was actually a negative error code.

This fix seperates the error code and socket in gitno_connect(), and fixes
the error handling in do_connect() functions to compensate. It appears
that git_connect() and the git-transport do_connect() functions had bugs
in the non-windows cases too (leaking sockets, and not properly reporting
connection error, respectively) so I went ahead and fixed those too.

12 years agoFix clar generated code to compile on MINGW32
Scott J. Goldman [Sat, 5 May 2012 20:16:48 +0000 (13:16 -0700)]
Fix clar generated code to compile on MINGW32

MINGW32 does not define _mktemp_s, so we can just use _mktemp instead. See
the non-compressed/non-base64-encoded version of the patch here:
http://gist.github.com/2605249

12 years agoFix valgrind issues
Russell Belfer [Fri, 4 May 2012 23:46:46 +0000 (16:46 -0700)]
Fix valgrind issues

There are three changes here:
- correctly propogate error code from failed object lookups
- make zlib inflate use our allocators
- add OID to notfound error in ODB lookups