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
Russell Belfer
5dca201072
Update iterators for consistency across library
...
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:
* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
(i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
the library and `giterr_last()` will return NULL if called.
This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
Vicent Marti
5daca042c6
filebuf: Check the return value for close
2012-08-03 01:01:21 +02:00
Carlos Martín Nieto
d96c3863a5
win32: set errno to ENOENT or ENOTDIR when appropriate in do_lstat
2012-08-02 02:12:16 +02:00
Vicent Marti
e25dda51c4
Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into development
...
Conflicts:
src/netops.c
src/netops.h
src/oid.c
2012-08-02 01:38:30 +02:00
Vicent Martí
95a1d87614
Merge pull request #850 from libgit2/attr-export
...
attr: Do not export variables externally
2012-08-01 16:31:00 -07:00
Vicent Marti
0ac349a9f3
repository: Indentation
2012-08-02 01:22:51 +02:00
Vicent Martí
e5f495012d
Merge pull request #848 from carlosmn/pending-message
...
repository: add a getter and remove function for git's prepared message
2012-08-01 16:21:41 -07:00