Russell Belfer
2fb4e9b3c5
Wrap up ignore API and add tests
...
This fills out the ignore API and adds tests.
2012-08-22 11:42:00 -07:00
Russell Belfer
f004c4a8a7
Add public API for internal ignores
...
This creates a public API for adding to the internal ignores
list, which already existing but was not accessible.
This adds the new default value for core.excludesfile also.
2012-08-21 17:26:39 -07:00
Ben Straub
b2be351aad
Win32: test core.autocrlf
2012-08-21 10:55:39 -07:00
Ben Straub
c35881420d
Tests: close file handles before asserting
...
Avoids getting ERROR_SHARING_VIOLATION on win32
and killing the entire clar run.
2012-08-20 20:24:20 -07:00
Vicent Martí
5c27da1f48
Merge pull request #884 from carlosmn/global-windows
...
Make the memory-window conrol structures global
2012-08-20 12:10:23 -07:00
Carlos Martín Nieto
8cef828d8d
Make the memory-window conrol structures global
...
Up to now, the idea was that the user would do all the operations for
one repository in the same thread. Thus we could have the
memory-mapped window information thread-local and avoid any locking.
This is not practical in a few environments, such as Apple's GCD which
allocates threads arbitrarily or the .NET CLR, where the OS-level
thread can change at any moment.
Make the control structure global and protect it with a mutex so we
don't depend on the thread currently executing the code.
2012-08-20 12:02:52 +02:00
Vicent Martí
6cb64ce34f
Merge pull request #879 from nulltoken/deprecated-mode
...
Handling of 100664 deprecated mode in tree entries
2012-08-19 15:12:43 -07:00
nulltoken
66439b0b1a
treebuilder: enhance attributes handling on insertion
2012-08-19 14:11:59 +02:00
nulltoken
a7e3bd9b0f
Add deprecated-mode.git test repository
2012-08-19 14:11:57 +02:00
Vicent Martí
f98c32f3fe
Merge pull request #778 from ben/clone
...
Clone
2012-08-19 01:26:06 -07:00
Vicent Martí
1a10fded40
Merge pull request #877 from nulltoken/minor-fixes
...
Minor fixes
2012-08-15 14:34:49 -07:00
nulltoken
e0db9f1117
refs: fix missing parameter documentation
2012-08-15 17:54:05 +02:00
nulltoken
5fd17fc217
notes: slight documentation enhancements
2012-08-15 17:50:02 +02:00
nulltoken
1a0537e450
Fix compilation warning
2012-08-15 00:08:38 +02:00
Carlos Martín Nieto
fc1826d149
tests: fix tree walking test
...
Return -1 to stop the iteration instead of not-0
2012-08-14 20:54:13 +02:00
Carlos Martín Nieto
85f28ba891
Merge pull request #873 from carlosmn/tree-walk
...
git_tree_walk callback return value semantic does not match documentation
2012-08-14 11:43:20 -07:00
Russell Belfer
3a6bc301c5
Merge pull request #875 from arrbee/fix-message-prettify-length-check
...
Fix message prettify length check
2012-08-14 11:30:18 -07:00
Russell Belfer
85a0e28b80
Make git_message_prettify return bytes written
...
If you want to be absolutely safe with git_message_prettify, you
can now pass a NULL pointer for the buffer and get back the number
of bytes that would be copied into the buffer.
This means that an error is a non-negative return code and a
success will be greater than zero from this function.
2012-08-14 10:50:58 -07:00
Vicent Martí
e08ca0d4a7
Merge pull request #871 from joshtriplett/fix-note_foreach-docs
...
git_note_foreach: Fix documentation for notes_ref parameter
2012-08-13 21:04:27 -07:00
Vicent Martí
a6ee620185
Merge pull request #870 from joshtriplett/fix-note_create-docs
...
git_note_oid: Fix the documentation to reference parameters using the correct names
2012-08-13 21:02:35 -07:00
Vicent Martí
0374e6abe7
Merge pull request #872 from joshtriplett/fix-note_remove-docs
...
git_note_create: Copyediting on documentation for the oid parameter
2012-08-13 21:02:12 -07:00
Vicent Martí
b7916444d9
Merge pull request #867 from joshtriplett/fix-array-size-for-git_config_get_mapped
...
Fix incorrect array size in example for git_config_get_mapped
2012-08-13 21:01:24 -07:00
Vicent Martí
c86dd38a64
Merge pull request #866 from arrbee/fix-config-file-parsing
...
Config file parser includes = in name if no space around it
2012-08-13 20:56:28 -07:00
Carlos Martín Nieto
a6bf16878a
tree: allow the user to skip an entry or cancel the walk
...
Returning a negative cancels the walk, and returning a positive one
causes us to skip an entry, which was previously done by a negative
value.
This allows us to stay consistent with the rest of the functions that
take a callback and keeps the skipping functionality.
2012-08-13 14:07:47 +02:00
Carlos Martín Nieto
53ae12359d
tree: bring back the documented behaviour for a walk
...
However, there should be a way to cancel the walk and another to skip
the entry.
2012-08-13 14:00:53 +02:00
Russell Belfer
616c1433b8
Clean up code
...
Okay, this is probably cleaner and it is also less net change
from the original version
2012-08-12 11:53:58 -07:00
Josh Triplett
39a60efd39
git_note_remove: Copyediting on documentation for the oid parameter
2012-08-12 11:31:12 -07:00
Russell Belfer
fdc637c4e2
Check prettify message output buffer after cleanup
...
This makes the message prettify buffer length check accurate.
2012-08-12 09:08:45 -07:00
Russell Belfer
a1ecddf01c
Fix config parser boundary logic
...
The config file parser was not working right if there was no
whitespace between the value name and the equals sign. This
fixes that.
2012-08-12 07:59:30 -07:00
Josh Triplett
d45ada03cf
git_note_foreach: Fix documentation for notes_ref parameter
2012-08-12 06:31:42 -07:00
Josh Triplett
22408f4d5f
git_note_oid: Fix the documentation to reference parameters using the correct names
2012-08-12 05:53:30 -07:00
Josh Triplett
b90202bbdd
Fix incorrect array size in example for git_config_get_mapped
...
In the documentation for git_config_get_mapped, the sample mapping
array uses [3] but has 4 entries. Fix by dropping the size entirely and
letting the compiler figure it out.
2012-08-12 03:56:15 -07:00
Vicent Martí
c9d78bde94
Merge pull request #863 from joshtriplett/export-git_attr_value
...
Export git_attr_value
2012-08-11 18:21:44 -07:00
Josh Triplett
5389005d93
Export git_attr_value
...
Commit 0c9eacf3d2
introduced the function
git_attr_value and switched the GIT_ATTR_* macros to use it, but
attempting to use that function leads to a linker error (undefined
reference to `git_attr_value'). Export git_attr_value so programs can
actually call it.
2012-08-11 18:14:07 -07:00
Michael Schubert
738837bdaa
sha1: add missing header guards
2012-08-11 12:29:24 +02:00
Vicent Marti
c07d9c95f2
oid: Explicitly include oid.h
for the inlined CMP
2012-08-09 15:33:04 -07:00
Russell Belfer
d7b3dab958
Merge pull request #861 from josh/parse-chomped-oid
...
Parse ref oids without trailing newline
2012-08-09 12:54:58 -07:00
Joshua Peek
de65f824cc
Merge remote-tracking branch 'arrbee/rtrim-loose-refs' into parse-chomped-oid
2012-08-09 14:47:58 -05:00
Joshua Peek
186c054d65
Revert implementation changes
2012-08-09 14:47:29 -05:00
Joshua Peek
28e0068172
Ignore ref oid terminator
2012-08-09 14:39:56 -05:00
Joshua Peek
e60af90498
Test trailing space after ref oid
2012-08-09 14:39:43 -05:00
Russell Belfer
2fe293b6fb
trim whitespace when parsing loose refs
2012-08-09 11:36:21 -07:00
Joshua Peek
6ab6829097
Parse ref oids without trailing newline
2012-08-09 12:39:09 -05:00
Russell Belfer
e4607392b5
Fix iterator check and return value
...
There is a little cleanup necessary from PR #843 . Since the
new callbacks return `GIT_EUSER` we have to be a little careful
about return values when they are used internally to the library.
Also, callbacks should be checked for non-zero return values,
not just less than zero.
2012-08-06 11:06:05 -07:00
Ben Straub
eb87800ab6
Checkout: fix memory leak in tests.
2012-08-06 09:34:17 -07:00
Vicent Marti
81f73a872c
test: Open ODB on each test suite
2012-08-06 12:53:09 +02:00
Vicent Marti
d8d28e2ef6
remotes: Proper return for git_remote_ls
2012-08-06 12:44:23 +02:00
Vicent Marti
51e1d80846
Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development
...
Conflicts:
src/notes.c
src/transports/git.c
src/transports/http.c
src/transports/local.c
tests-clar/odb/foreach.c
2012-08-06 12:41:08 +02:00
Michael Schubert
7e9f78b5fe
remote: add missing include git2/remote.h
...
Otherwise we get an incomplete type error, since git_remote_callbacks
isn't declared yet.
2012-08-04 15:30:28 +02:00
Russell Belfer
b0d376695e
Add new iteration behavior to git_tree_walk
...
Missed this one, ironically enough.
2012-08-03 17:24:59 -07:00