Vicent Martí
e65752bb32
Merge pull request #677 from arrbee/status-without-head
...
Add support for diffing index with no HEAD
2012-05-08 16:06:27 -07:00
Russell Belfer
7e000ab2ec
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.
2012-05-08 15:03:59 -07:00
Vicent Martí
fd5faae346
message: Cleanup
2012-05-08 23:55:37 +02:00
Vicent Martí
b1e2ba275a
message: Proper OOM handling
2012-05-08 23:43:52 +02:00
Vicent Martí
c99bdacf71
Merge pull request #670 from nulltoken/ntk/topic/clean-commit_message
...
Clean commit and tag messages
2012-05-08 14:13:43 -07:00
Russell Belfer
364f51bdca
Merge pull request #668 from nulltoken/topic/binary-blobs
...
Enhancing the blob diffing experience
2012-05-08 13:56:21 -07:00
Vicent Martí
1f796cd180
Merge pull request #676 from carlosmn/remotes
...
Add git_remote_add() and change signature for _new()
2012-05-08 13:42:11 -07:00
Russell Belfer
19579847f6
Clean up warnings and tests
2012-05-08 13:23:00 -07:00
Carlos Martín Nieto
baaa8a447e
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.
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
a209a025c6
remote: add git_remote_add()
...
Helper function to create a remote with the default settings
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
3df9cc5922
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.
2012-05-08 21:35:51 +02:00
Russell Belfer
2c0cdc3a86
Merge pull request #674 from nulltoken/topic/GIT_ENOTFOUND
...
Improve the interop with bindings
2012-05-08 10:40:01 -07:00
Carlos Martín Nieto
65ca81a63e
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.
2012-05-08 14:28:21 +02:00
nulltoken
722c08afec
status: Prevent git_status_file() from returning ENOTFOUND when not applicable
2012-05-08 10:05:27 +02:00
nulltoken
464cf248fd
repository: ensure git_repository_discover() returns ENOTFOUND when unable to find a repository given the constraints
2012-05-08 10:05:24 +02:00
nulltoken
0b0957a661
fileops: replace integer usage with more explicit enum in some git_futils_rmdir_r() calls
2012-05-08 10:05:22 +02:00
nulltoken
d7d8a0bfd4
repository: ensure git_repository_open() returns ENOTFOUND when being passed a path leading to no repository
2012-05-08 10:05:20 +02:00
nulltoken
9abb5bca5d
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
2012-05-08 10:05:18 +02:00
nulltoken
46811561ae
path: Make git_path_prettify() properly handle ENOTDIR errno value
2012-05-08 10:05:16 +02:00
nulltoken
cb0ce16bbe
object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type
2012-05-08 10:05:14 +02:00
nulltoken
9fb70f378a
remote: make git_remote_load() return GIT_ENOTFOUND when the remote url cannot be retrieved from the config file
2012-05-08 10:05:12 +02:00
nulltoken
2fb9d6de95
remote: ensure the allocated remote is freed when an error occurs during its loading
2012-05-08 10:05:09 +02:00
Vicent Martí
8d89c8e972
Merge pull request #672 from scottjg/more-mingw32-fixes
...
More mingw32 compilation fixes.
2012-05-07 13:36:02 -07:00
Russell Belfer
cba285d32f
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.
2012-05-07 13:32:30 -07:00
Russell Belfer
df0c89534d
Merge pull request #667 from nulltoken/fix/p_open
...
compat: make p_open able to accept optional mode when passing the O_CREAT flag
2012-05-07 10:20:49 -07:00
Carlos Martín Nieto
c2d82a6533
travis: run the tests verbosely
2012-05-07 12:31:31 +02:00
nulltoken
3191ae89c6
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.
2012-05-07 12:18:54 +02:00
nulltoken
d1c4312a02
diff: improve git_diff_blobs() documentation
2012-05-07 12:18:34 +02:00
nulltoken
9a29f8d56c
diff: fix the diffing of two identical blobs
2012-05-07 12:18:33 +02:00
nulltoken
28ef7f9b28
diff: make git_diff_blobs() able to detect binary blobs
2012-05-07 12:18:32 +02:00
nulltoken
cfe25b13fa
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
2012-05-07 12:18:32 +02:00
nulltoken
4f80676182
diff: fix the diffing of a concrete blob against a null one
2012-05-07 12:18:31 +02:00
nulltoken
245c5eaec5
diff: When diffing two blobs, ensure the delta callback parameter is filled with relevant information
2012-05-07 12:18:31 +02:00
nulltoken
8d0f46754f
diff: remove unused parameter
2012-05-07 12:18:30 +02:00
nulltoken
458b94503d
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
2012-05-07 12:16:04 +02:00
Carlos Martín Nieto
9b62e40ecd
clar helper: don't dereference giterr_last() if it's NULL
...
It can cause segfaults if the call didn't set an error
2012-05-07 11:29:10 +02:00
Scott J. Goldman
901fbdad1b
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.
2012-05-07 00:05:02 -07:00
Scott J. Goldman
17847c78dd
Update clar to latest version
...
Fixes the mingw32 build issues.
2012-05-06 23:58:41 -07:00
Carlos Martín Nieto
49ac5ac8fc
transport git: don't use 'error' uninitialized
2012-05-06 13:17:39 +02:00
Vicent Martí
3972ca43d8
compat: Add stdarg.h
include
2012-05-05 22:14:02 -07:00
Vicent Martí
cd58c15c58
Merge remote-tracking branch 'scottjg/fix-mingw32' into development
...
Conflicts:
src/netops.c
src/netops.h
src/transports/http.c
tests-clar/clar
2012-05-05 16:47:20 -07:00
Vicent Martí
48ecd122ea
Merge pull request #659 from libgit2/development-merge
...
New-error-handling
2012-05-05 14:22:53 -07:00
Vicent Martí
4ef14af935
Merge pull request #664 from arrbee/attrs-from-index
...
Support git attrs from index (and bare repo)
2012-05-05 14:22:06 -07:00
Vicent Martí
f95e8cc07c
notes: Cleanup error handling
2012-05-05 14:18:10 -07:00
Vicent Martí
d3a60dc244
Merge pull request #663 from schu/notes-honor-config
...
Honor core.notesRef config option
2012-05-05 14:14:58 -07:00
Scott J. Goldman
35cdd261f3
Fix unsigned/signed comparison on Windows in commitstagedfile.c
2012-05-05 13:54:33 -07:00
Scott J. Goldman
b47e0a7171
Fix missing prototype warning in utf-conv.c
2012-05-05 13:52:48 -07:00
Scott J. Goldman
b4b96d56bf
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.
2012-05-05 13:33:46 -07:00
Scott J. Goldman
06ac3e7f34
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
2012-05-05 13:16:48 -07:00
Russell Belfer
282283acc6
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
2012-05-04 16:46:46 -07:00