Vicent Martí
8c6329eec9
Merge pull request #692 from nulltoken/fix/delete-branch_ENOTFOUND
...
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
2012-05-14 11:25:40 -07:00
Vicent Martí
c9e9ec97d2
Merge pull request #688 from hanwen/master
...
See issue https://github.com/libgit2/libgit2/issues/680
2012-05-14 11:24:37 -07:00
Vicent Martí
e49cb1687e
Merge pull request #671 from nulltoken/topic/blob_create_fromdisk
...
Add git_blob_create_fromdisk()
2012-05-14 11:03:30 -07:00
Vicent Martí
72bfde9790
Merge pull request #681 from scottjg/solaris-fixes
...
Fix build/runtime issues on Solaris
2012-05-14 11:01:14 -07:00
Vicent Martí
27f5b7cfed
Merge pull request #682 from arrbee/attribute-cache-buster
...
Attribute cache buster
2012-05-14 10:58:23 -07:00
nulltoken
87fe3507bb
iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator
2012-05-13 19:09:57 +02:00
nulltoken
6ca9643c96
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.
2012-05-13 11:28:49 +02:00
nulltoken
341a7136f6
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
2012-05-13 10:30:13 +02:00
Han-Wen Nienhuys
24634c6fd0
Handle duplicate objects from different backends in git_odb_read_prefix().
2012-05-12 15:50:19 -03:00
Scott J. Goldman
6fb1c0b489
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.
2012-05-12 09:51:32 -07:00
Vicent Martí
b72969e064
Merge pull request #683 from arrbee/better-repo-init
...
Improve repo initialization to be more like git
2012-05-12 01:51:58 -07:00
nulltoken
e28c37761b
object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type
...
This fix complements cb0ce16bbe 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
2012-05-11 23:56:23 +02:00
Russell Belfer
db62807215
Fixed leaks and added tests
2012-05-11 12:16:19 -07:00
Scott J. Goldman
54bdc64a92
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.
2012-05-10 17:13:06 -07:00
Russell Belfer
dc13f1f7d7
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.
2012-05-10 11:12:43 -07:00
Scott J. Goldman
ec42eafd4a
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/
2012-05-10 09:52:49 -07:00
Russell Belfer
dc34da6e81
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.
2012-05-09 10:58:42 -07:00
Russell Belfer
2aa1e94d30
Fix 64-bit build warning
2012-05-09 10:30:34 -07:00
Russell Belfer
075d6e7dd7
Merge pull request #679 from nulltoken/fix/git__isspace
...
util: Fix git__isspace() implementation
2012-05-09 10:18:54 -07:00
Carlos Martín Nieto
11678b3718
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.
2012-05-09 16:18:13 +02:00
Carlos Martín Nieto
0536afcaa9
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.
2012-05-09 14:10:30 +02:00
nulltoken
9cd25d0003
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
2012-05-09 13:21:21 +02:00
Carlos Martín Nieto
a640d79e84
indexer: close the pack's fd before renaming it
...
Windows gets upset if we rename a file with an open descriptor.
2012-05-09 13:11:50 +02:00
Vicent Martí
0f49200c9a
msvc: Do not use isspace
...
Locale-aware bullshit bitting my ass again yo
2012-05-09 04:37:02 +02:00
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
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
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
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
4f80676182
diff: fix the diffing of a concrete blob against a null one
2012-05-07 12:18:31 +02:00