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
Vicent Martí
a9d9965b35
clar: Update from upstream
2012-05-09 22:55:01 +02:00
nulltoken
1956693fa0
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.
2012-05-09 21:14:49 +02:00
Michael Schubert
b470019f7f
tests-clar/diff: fix missing-prototype warning
2012-05-09 18:02:13 +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í
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
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
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
Vicent Martí
8d89c8e972
Merge pull request #672 from scottjg/more-mingw32-fixes
...
More mingw32 compilation fixes.
2012-05-07 13:36:02 -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
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
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
17847c78dd
Update clar to latest version
...
Fixes the mingw32 build issues.
2012-05-06 23:58:41 -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í
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í
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
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
Vicent Martí
674a198599
clar: Properly create files in helper
2012-05-04 16:05:14 -07:00
Russell Belfer
3ec1fa5e1c
Fixing issue with test data
2012-05-04 13:55:07 -07:00
Russell Belfer
b709e95146
Fix memory leaks and use after free
2012-05-04 11:06:12 -07:00
Russell Belfer
f917481ee8
Support reading attributes from index
...
Depending on the operation, we need to consider gitattributes
in both the work dir and the index. This adds a parameter to
all of the gitattributes related functions that allows user
control of attribute reading behavior (i.e. prefer workdir,
prefer index, only use index).
This fix also covers allowing us to check attributes (and
hence do diff and status) on bare repositories.
This was a somewhat larger change that I hoped because it had
to change the cache key used for gitattributes files.
2012-05-03 16:37:25 -07:00
Michael Schubert
630c5a4a54
notes: add git_note_default_ref()
...
Add git_note_default_ref to allow easy retrieval of the currently set
default notes reference.
2012-05-03 22:31:29 +02:00
Michael Schubert
caea5e5433
notes: honor core.notesRef
...
Setting core.notesRef allows to change the default notes reference used
by Git. Check if set before using GIT_NOTES_DEFAULT_REF. Fixes #649 .
2012-05-03 22:31:29 +02:00
Vicent Martí
76873c0905
Silence return value warning
2012-05-03 13:30:14 -07:00
Vicent Martí
3fbcac89c4
Remove old and unused error codes
2012-05-02 19:56:38 -07:00
Vicent Martí
b02bcd97f8
Boom
2012-05-02 16:57:16 -07:00
Russell Belfer
17f1c9fb33
chmod for writability when writing test files
2012-05-02 16:44:47 -07:00
Vicent Martí
a1d0802576
Backport more test data
2012-05-02 16:33:26 -07:00
Vicent Martí
8c83fead91
Move test resources
2012-05-02 16:18:55 -07:00
Vicent Martí
946a6dc4e6
Update test suite
2012-05-02 16:14:30 -07:00
Vicent Martí
40879facad
Merge branch 'new-error-handling' into development
...
Conflicts:
.travis.yml
include/git2/diff.h
src/config_file.c
src/diff.c
src/diff_output.c
src/mwindow.c
src/path.c
tests-clar/clar_helpers.c
tests-clar/object/tree/frompath.c
tests/t00-core.c
tests/t03-objwrite.c
tests/t08-tag.c
tests/t10-refs.c
tests/t12-repo.c
tests/t18-status.c
tests/test_helpers.c
tests/test_main.c
2012-05-02 15:59:02 -07:00