]>
git.proxmox.com Git - libgit2.git/log
nulltoken [Wed, 15 Aug 2012 15:54:05 +0000 (17:54 +0200)]
refs: fix missing parameter documentation
nulltoken [Wed, 15 Aug 2012 15:50:02 +0000 (17:50 +0200)]
notes: slight documentation enhancements
nulltoken [Tue, 14 Aug 2012 22:08:38 +0000 (00:08 +0200)]
Fix compilation warning
Carlos Martín Nieto [Tue, 14 Aug 2012 18:54:13 +0000 (20:54 +0200)]
tests: fix tree walking test
Return -1 to stop the iteration instead of not-0
Carlos Martín Nieto [Tue, 14 Aug 2012 18:43:20 +0000 (11:43 -0700)]
Merge pull request #873 from carlosmn/tree-walk
git_tree_walk callback return value semantic does not match documentation
Russell Belfer [Tue, 14 Aug 2012 18:30:18 +0000 (11:30 -0700)]
Merge pull request #875 from arrbee/fix-message-prettify-length-check
Fix message prettify length check
Russell Belfer [Tue, 14 Aug 2012 17:50:58 +0000 (10:50 -0700)]
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.
Vicent Martí [Tue, 14 Aug 2012 04:04:27 +0000 (21:04 -0700)]
Merge pull request #871 from joshtriplett/fix-note_foreach-docs
git_note_foreach: Fix documentation for notes_ref parameter
Vicent Martí [Tue, 14 Aug 2012 04:02:35 +0000 (21:02 -0700)]
Merge pull request #870 from joshtriplett/fix-note_create-docs
git_note_oid: Fix the documentation to reference parameters using the correct names
Vicent Martí [Tue, 14 Aug 2012 04:02:12 +0000 (21:02 -0700)]
Merge pull request #872 from joshtriplett/fix-note_remove-docs
git_note_create: Copyediting on documentation for the oid parameter
Vicent Martí [Tue, 14 Aug 2012 04:01:24 +0000 (21:01 -0700)]
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
Vicent Martí [Tue, 14 Aug 2012 03:56:28 +0000 (20:56 -0700)]
Merge pull request #866 from arrbee/fix-config-file-parsing
Config file parser includes = in name if no space around it
Carlos Martín Nieto [Mon, 13 Aug 2012 12:07:47 +0000 (14:07 +0200)]
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.
Carlos Martín Nieto [Mon, 13 Aug 2012 12:00:53 +0000 (14:00 +0200)]
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.
Russell Belfer [Sun, 12 Aug 2012 18:53:58 +0000 (11:53 -0700)]
Clean up code
Okay, this is probably cleaner and it is also less net change
from the original version
Josh Triplett [Sun, 12 Aug 2012 14:06:11 +0000 (07:06 -0700)]
git_note_remove: Copyediting on documentation for the oid parameter
Russell Belfer [Sun, 12 Aug 2012 16:08:45 +0000 (09:08 -0700)]
Check prettify message output buffer after cleanup
This makes the message prettify buffer length check accurate.
Russell Belfer [Sun, 12 Aug 2012 14:59:30 +0000 (07:59 -0700)]
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.
Josh Triplett [Sun, 12 Aug 2012 13:31:42 +0000 (06:31 -0700)]
git_note_foreach: Fix documentation for notes_ref parameter
Josh Triplett [Sun, 12 Aug 2012 12:53:30 +0000 (05:53 -0700)]
git_note_oid: Fix the documentation to reference parameters using the correct names
Josh Triplett [Sun, 12 Aug 2012 10:56:15 +0000 (03:56 -0700)]
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.
Vicent Martí [Sun, 12 Aug 2012 01:21:44 +0000 (18:21 -0700)]
Merge pull request #863 from joshtriplett/export-git_attr_value
Export git_attr_value
Josh Triplett [Sun, 12 Aug 2012 01:14:07 +0000 (18:14 -0700)]
Export git_attr_value
Commit
0c9eacf3d2c83256736a5bb2a240e73afd13d55f 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.
Michael Schubert [Sat, 11 Aug 2012 10:29:24 +0000 (12:29 +0200)]
sha1: add missing header guards
Vicent Marti [Thu, 9 Aug 2012 22:33:04 +0000 (15:33 -0700)]
oid: Explicitly include `oid.h` for the inlined CMP
Russell Belfer [Thu, 9 Aug 2012 19:54:58 +0000 (12:54 -0700)]
Merge pull request #861 from josh/parse-chomped-oid
Parse ref oids without trailing newline
Joshua Peek [Thu, 9 Aug 2012 19:47:58 +0000 (14:47 -0500)]
Merge remote-tracking branch 'arrbee/rtrim-loose-refs' into parse-chomped-oid
Joshua Peek [Thu, 9 Aug 2012 19:47:29 +0000 (14:47 -0500)]
Revert implementation changes
Joshua Peek [Thu, 9 Aug 2012 19:39:56 +0000 (14:39 -0500)]
Ignore ref oid terminator
Joshua Peek [Thu, 9 Aug 2012 19:39:43 +0000 (14:39 -0500)]
Test trailing space after ref oid
Russell Belfer [Thu, 9 Aug 2012 18:36:21 +0000 (11:36 -0700)]
trim whitespace when parsing loose refs
Joshua Peek [Thu, 9 Aug 2012 17:39:09 +0000 (12:39 -0500)]
Parse ref oids without trailing newline
Russell Belfer [Mon, 6 Aug 2012 18:06:05 +0000 (11:06 -0700)]
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.
Vicent Marti [Mon, 6 Aug 2012 10:53:09 +0000 (12:53 +0200)]
test: Open ODB on each test suite
Vicent Marti [Mon, 6 Aug 2012 10:44:23 +0000 (12:44 +0200)]
remotes: Proper return for `git_remote_ls`
Vicent Marti [Mon, 6 Aug 2012 10:41:08 +0000 (12:41 +0200)]
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
Michael Schubert [Sat, 4 Aug 2012 13:22:38 +0000 (15:22 +0200)]
remote: add missing include git2/remote.h
Otherwise we get an incomplete type error, since git_remote_callbacks
isn't declared yet.
Russell Belfer [Sat, 4 Aug 2012 00:24:59 +0000 (17:24 -0700)]
Add new iteration behavior to git_tree_walk
Missed this one, ironically enough.
Russell Belfer [Sat, 4 Aug 2012 00:08:01 +0000 (17:08 -0700)]
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.
Vicent Marti [Thu, 2 Aug 2012 23:01:21 +0000 (01:01 +0200)]
filebuf: Check the return value for `close`
Carlos Martín Nieto [Wed, 1 Aug 2012 23:56:02 +0000 (01:56 +0200)]
win32: set errno to ENOENT or ENOTDIR when appropriate in do_lstat
Vicent Marti [Wed, 1 Aug 2012 23:38:30 +0000 (01:38 +0200)]
Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into development
Conflicts:
src/netops.c
src/netops.h
src/oid.c
Vicent Martí [Wed, 1 Aug 2012 23:31:00 +0000 (16:31 -0700)]
Merge pull request #850 from libgit2/attr-export
attr: Do not export variables externally
Vicent Marti [Wed, 1 Aug 2012 23:22:51 +0000 (01:22 +0200)]
repository: Indentation
Vicent Martí [Wed, 1 Aug 2012 23:21:41 +0000 (16:21 -0700)]
Merge pull request #848 from carlosmn/pending-message
repository: add a getter and remove function for git's prepared message
Vicent Marti [Wed, 1 Aug 2012 23:15:24 +0000 (01:15 +0200)]
attr: Do not export variables externally
Fixes #824
Exporting variables in a dynamic library is a PITA. Let's keep
these values internally and wrap them through a helper method.
This doesn't break the external API. @arrbee, aren't you glad I turned
the `GIT_ATTR_` macros into function macros? :sparkles:
Vicent Martí [Wed, 1 Aug 2012 22:18:03 +0000 (15:18 -0700)]
Merge pull request #849 from scunz/git_caps
Add function to query for compile time settings.
Sascha Cunz [Wed, 1 Aug 2012 18:02:32 +0000 (20:02 +0200)]
Add function to query for compile time settings.
Carlos Martín Nieto [Wed, 1 Aug 2012 15:49:19 +0000 (17:49 +0200)]
repository: add a getter and remove function for git's prepared message
The 'git revert/cherry-pick/merge -n' commands leave .git/MERGE_MSG
behind so that git-commit can find it. As we don't yet support these
operations, users who are shelling out to let git perform these
operations haven't had a convenient way to get this message.
These functions allow the user to retrieve the message and remove it
when she's created the commit.
Vicent Martí [Tue, 31 Jul 2012 17:19:30 +0000 (10:19 -0700)]
Merge pull request #826 from carlosmn/config-find-error
git_config_find_* does not set a git error
Vicent Martí [Tue, 31 Jul 2012 17:17:22 +0000 (10:17 -0700)]
Merge pull request #837 from carlosmn/travis
travis: be more idiomatic with the environment
Vicent Martí [Tue, 31 Jul 2012 17:16:21 +0000 (10:16 -0700)]
Merge pull request #833 from carlosmn/odb-one
odb: allow creating an ODB backend from a packfile index
Vicent Martí [Mon, 30 Jul 2012 23:17:35 +0000 (16:17 -0700)]
Merge pull request #840 from carlosmn/remote-unify
Unify the transport code
Carlos Martín Nieto [Thu, 26 Jul 2012 23:09:06 +0000 (01:09 +0200)]
transport: rename encrypt to use_ssl
SSL isn't the only way that a transport can be encrypted. The new name
will make it easier to merge the SSH support.
Carlos Martín Nieto [Wed, 25 Jul 2012 14:30:58 +0000 (16:30 +0200)]
fetch: remove timeout code
Carlos Martín Nieto [Wed, 25 Jul 2012 14:16:53 +0000 (16:16 +0200)]
ssl: use the callback instead of ifs to determine how to get data
Using the callbacks makes it clearer and reduces the amount of #ifdefs
and ifs and we need in the code.
Carlos Martín Nieto [Wed, 25 Jul 2012 08:52:20 +0000 (10:52 +0200)]
examples: fix warnings in network/
Carlos Martín Nieto [Wed, 25 Jul 2012 08:40:59 +0000 (10:40 +0200)]
transport: store the refs in a common area
Instad of each transport having its own function and logic to get to
its refs, store them directly in transport.
Leverage the new gitno_buffer to make the parsing and storing of the
refs use common code and get rid of the git_protocol struct.
Carlos Martín Nieto [Tue, 24 Jul 2012 17:03:22 +0000 (19:03 +0200)]
remote: use the same code to control git and http
This allows us to add capabilitites to both at the same time, keeps
them in sync and removes a lot of code.
gitno_buffer now uses a callback to fill its buffer, allowing us to
use the same interface for git and http (which uses callbacks).
Carlos Martín Nieto [Tue, 24 Jul 2012 15:10:57 +0000 (17:10 +0200)]
network: implement multi_ack for the git transport
Carlos Martín Nieto [Tue, 24 Jul 2012 12:23:16 +0000 (14:23 +0200)]
remote: start moving the protocol to a common area
For the transition, http is going to keep its own logic until the
git/common code catches up with the implied multi_ack that http
has. This also has the side-effect of making the code cleaner and more
correct regardingt he protocol.
Russell Belfer [Mon, 30 Jul 2012 05:30:01 +0000 (22:30 -0700)]
Merge pull request #847 from schu/inline-oid-cmp
git_oid_cmp: inline memcmp by hand to optimize
Michael Schubert [Fri, 27 Jul 2012 08:53:09 +0000 (10:53 +0200)]
git_oid_cmp: inline memcmp by hand to optimize
git.git uses an inlined hashcmp function instead of memcmp, since it
performes much better when comparing hashes (most hashes compared
diverge within the first byte).
Measurements and rationale for the curious reader:
http://thread.gmane.org/gmane.comp.version-control.git/172286
Michael Schubert [Sat, 28 Jul 2012 09:33:12 +0000 (11:33 +0200)]
Fix -Wuninitialized warning
Vicent Martí [Fri, 27 Jul 2012 18:09:04 +0000 (11:09 -0700)]
Merge pull request #839 from nulltoken/topic/odb-foreach-documentation
odb: add some documentation to the foreach() test
Vicent Martí [Fri, 27 Jul 2012 16:52:44 +0000 (09:52 -0700)]
Merge pull request #834 from carlosmn/network-callbacks
Add a struct for network callbacks
Vicent Marti [Fri, 27 Jul 2012 16:49:37 +0000 (18:49 +0200)]
branch: Add `repository` argument to `create`
Yes, we can get the repository from the owner of the object, but having
it marked explicitly makes the API more consistent.
Vicent Marti [Fri, 27 Jul 2012 16:45:55 +0000 (18:45 +0200)]
Merge remote-tracking branch 'nulltoken/topic/branch-rework' into development
Vicent Marti [Fri, 27 Jul 2012 16:43:02 +0000 (18:43 +0200)]
reflog: Rename `entry_drop` to `drop`
Vicent Marti [Fri, 27 Jul 2012 16:39:40 +0000 (18:39 +0200)]
Merge remote-tracking branch 'nulltoken/topic/reflog-delete' into development
Carlos Martín Nieto [Fri, 27 Jul 2012 00:37:15 +0000 (02:37 +0200)]
remote: fix C99-ism
Carlos Martín Nieto [Fri, 27 Jul 2012 00:29:58 +0000 (17:29 -0700)]
Merge pull request #838 from scunz/remote_push_url
Add support for push-urls
Russell Belfer [Thu, 26 Jul 2012 23:10:22 +0000 (16:10 -0700)]
Fix git_tree_walk to return user error
This makes sure that an error code returned by the callback function
of `git_tree_walk` will stop the iteration and get propagated back
to the caller verbatim.
Also, this adds a minor helper function `git_tree_entry_byoid` that
searches a `git_tree` for an entry with the given OID. This isn't
a fast function, but it's easier than writing the loop yourself as
an external user of the library.
Sascha Cunz [Wed, 25 Jul 2012 00:34:12 +0000 (02:34 +0200)]
Remotes: Use correct url in git_remote_connect
Sascha Cunz [Wed, 25 Jul 2012 00:10:35 +0000 (02:10 +0200)]
Remotes: Save a cleaned pushurl (by deleting it from the config)
Sascha Cunz [Tue, 24 Jul 2012 23:59:23 +0000 (01:59 +0200)]
Tests: Test remote's pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:33:15 +0000 (01:33 +0200)]
Remotes: Setter for url+pushurl; Getter for pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:32:31 +0000 (01:32 +0200)]
Remotes: Load/Save for fetch.foo.pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:14:58 +0000 (01:14 +0200)]
Remove unneccessary string transformation
Michael Schubert [Wed, 25 Jul 2012 15:01:50 +0000 (17:01 +0200)]
tests-clar/status: fix missing-prototype warning
nulltoken [Wed, 25 Jul 2012 07:00:58 +0000 (09:00 +0200)]
odb: add some documentation to the foreach() test
nulltoken [Sat, 21 Jul 2012 17:19:46 +0000 (19:19 +0200)]
reflog: keep the reflog name in sync with the reference name
nulltoken [Sat, 21 Jul 2012 10:33:46 +0000 (12:33 +0200)]
reflog: prevent git_reflog_append() from persisting the reflog back to disk
nulltoken [Sat, 21 Jul 2012 10:32:02 +0000 (12:32 +0200)]
reflog: prevent git_reflog_read() from chocking when no log exists yet
nulltoken [Wed, 18 Jul 2012 18:12:45 +0000 (20:12 +0200)]
reflog: introduce git_reflog_write()
nulltoken [Mon, 16 Jul 2012 10:12:53 +0000 (12:12 +0200)]
reflog: rename git_reflog_write() to git_reflog_append()
nulltoken [Mon, 16 Jul 2012 16:31:22 +0000 (18:31 +0200)]
reflog: introduce git_reflog_entry_drop()
nulltoken [Tue, 17 Jul 2012 08:53:19 +0000 (10:53 +0200)]
reflog: add GIT_OID_HEX_ZERO constant
nulltoken [Mon, 16 Jul 2012 13:14:29 +0000 (15:14 +0200)]
tests: reorganize reflog tests
Russell Belfer [Tue, 24 Jul 2012 18:21:32 +0000 (11:21 -0700)]
Merge pull request #799 from yorah/fix/issue-787
Fix/issue 787
Carlos Martín Nieto [Tue, 24 Jul 2012 17:07:55 +0000 (19:07 +0200)]
travis: be more idiomatic with the environment
Instead of putting the compilers in CC, use the travis configuration
to specify them.
Also ask it to send reports to the IRC channel.
nulltoken [Tue, 24 Jul 2012 05:57:58 +0000 (07:57 +0200)]
portability: Improve x86/amd64 compatibility
nulltoken [Fri, 20 Jul 2012 14:41:41 +0000 (16:41 +0200)]
branch: enforce git_branch_delete() parameter checking
nulltoken [Fri, 20 Jul 2012 14:39:22 +0000 (16:39 +0200)]
refs: drop git_reference_remote_tracking_from_branch()
nulltoken [Fri, 20 Jul 2012 14:38:54 +0000 (16:38 +0200)]
branch: introduce git_branch_tracking()
nulltoken [Fri, 20 Jul 2012 14:34:08 +0000 (16:34 +0200)]
branch: make git_branch_move() reference based
nulltoken [Fri, 20 Jul 2012 14:31:17 +0000 (16:31 +0200)]
branch: slight git_branch_create() doc improvement
nulltoken [Fri, 20 Jul 2012 14:27:56 +0000 (16:27 +0200)]
branch: introduce git_reference_is_branch()
nulltoken [Fri, 20 Jul 2012 14:19:04 +0000 (16:19 +0200)]
branch: introduce git_branch_lookup()
nulltoken [Thu, 19 Jul 2012 13:39:16 +0000 (15:39 +0200)]
branch: change git_branch_create() to make it return a reference