]>
git.proxmox.com Git - libgit2.git/log
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
nulltoken [Thu, 19 Jul 2012 13:32:58 +0000 (15:32 +0200)]
branch: remove useless header
yorah [Mon, 23 Jul 2012 16:16:09 +0000 (18:16 +0200)]
Add flag to turn off pathspec testing for diff and status
yorah [Wed, 18 Jul 2012 14:26:55 +0000 (16:26 +0200)]
Fix getting status of files containing brackets
yorah [Wed, 18 Jul 2012 14:26:11 +0000 (16:26 +0200)]
Add more test coverage to match default git behavior for files containing brackets
aroben [Tue, 3 Jul 2012 15:46:07 +0000 (17:46 +0200)]
Add a test for getting status of files containing brackets
yorah [Thu, 12 Jul 2012 14:31:59 +0000 (16:31 +0200)]
Add git_buf_unescape and git__unescape to unescape all characters in a string (in-place)
Carlos Martín Nieto [Tue, 24 Jul 2012 08:34:28 +0000 (10:34 +0200)]
update_tips: report error if it fails to create a ref
Carlos Martín Nieto [Mon, 23 Jul 2012 19:56:06 +0000 (21:56 +0200)]
revparse: initialize 'parsed' in case the user doesn't give a number with the @-notation
Carlos Martín Nieto [Sun, 22 Jul 2012 17:42:47 +0000 (19:42 +0200)]
travis: build with both gcc and clang
Carlos Martín Nieto [Mon, 23 Jul 2012 19:22:53 +0000 (21:22 +0200)]
revparse: don't allow an empty string
Asking the library for "" used to give HEAD, but that's trying to
impose a default at the wrong layer. Make it fail.
Carlos Martín Nieto [Sat, 21 Jul 2012 17:11:42 +0000 (19:11 +0200)]
config: set the error code if we can't find the global/system config
Carlos Martín Nieto [Sat, 21 Jul 2012 15:52:51 +0000 (17:52 +0200)]
Add a struct for network callbacks
Currently only update_tips is used, but it prepares the way for
progress output during download.
Carlos Martín Nieto [Sat, 21 Jul 2012 15:54:56 +0000 (17:54 +0200)]
tests: plug a leak in the config stress
Vicent Martí [Sat, 21 Jul 2012 14:56:59 +0000 (07:56 -0700)]
Merge pull request #818 from nulltoken/rework
Revparse rework
Carlos Martín Nieto [Sat, 21 Jul 2012 14:24:13 +0000 (16:24 +0200)]
repo: add git_repository_wrap_odb() to wrap an ODB
Primarily useful when used together with git_odb_backend_one_pack().
Carlos Martín Nieto [Sat, 21 Jul 2012 14:23:49 +0000 (16:23 +0200)]
odb: allow creating an ODB backend from a packfile index
git_odb_backend_one_packfile() allows us to create an ODB backend out
of an .idx file.
Carlos Martín Nieto [Fri, 20 Jul 2012 15:52:53 +0000 (17:52 +0200)]
config: escape subsection names when creating them
This allows us to set options like "some.foo\\ish.var".
This closes #830
Vicent Martí [Fri, 20 Jul 2012 13:56:09 +0000 (06:56 -0700)]
Merge pull request #831 from schu/tree-walk-order
tree: fix ordering for git_tree_walk
Russell Belfer [Thu, 19 Jul 2012 17:23:45 +0000 (10:23 -0700)]
Fix bug with merging diffs with null options
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it. I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
Michael Schubert [Thu, 19 Jul 2012 15:33:48 +0000 (17:33 +0200)]
tree: fix ordering for git_tree_walk
Josh Triplett noticed libgit2 actually does preorder entries in
tree_walk_post instead of postorder. Also, we continued walking even
when an error occured in the callback.
Fix #773; also, allow both pre- and postorder walking.
nulltoken [Sun, 15 Jul 2012 09:59:31 +0000 (11:59 +0200)]
revparse: deploy git_object_peel()
nulltoken [Sun, 15 Jul 2012 09:06:15 +0000 (11:06 +0200)]
object: introduce git_object_peel()
Partially fix #530
nulltoken [Sat, 14 Jul 2012 22:46:26 +0000 (00:46 +0200)]
revparse: enhance parsing engine
Vicent Martí [Tue, 17 Jul 2012 11:14:49 +0000 (04:14 -0700)]
Merge pull request #827 from schu/cleanup-error-cruft
Remove old error handling code
Michael Schubert [Tue, 17 Jul 2012 08:52:16 +0000 (10:52 +0200)]
Remove old error handling code
Vicent Martí [Mon, 16 Jul 2012 11:50:26 +0000 (04:50 -0700)]
Merge pull request #823 from schu/cmake-install-dir
libgit2.pc.in: also switch to LIB_INSTALL_DIR
Michael Schubert [Mon, 16 Jul 2012 10:41:30 +0000 (12:41 +0200)]
libgit2.pc.in: also switch to LIB_INSTALL_DIR
b3237ac3 changed CMakeList.txt to use the more standard LIB_INSTALL_DIR
variable instead of INSTALL_LIB, but forgot to change libgit2.pc.in etc.
accordingly.
nulltoken [Sat, 14 Jul 2012 22:46:01 +0000 (00:46 +0200)]
revparse: extend test coverage
nulltoken [Sat, 14 Jul 2012 22:45:20 +0000 (00:45 +0200)]
revparse: add reflog test data
Vicent Martí [Sun, 15 Jul 2012 14:42:14 +0000 (07:42 -0700)]
Merge pull request #821 from nacho/development
Add support for the more standard LIB_INSTALL_DIR variable
Vicent Marti [Sun, 15 Jul 2012 12:11:58 +0000 (14:11 +0200)]
attr: Rename the `git_attr__` exports
Pevents collisions with the original libgit, which also exports those
exact symbols.
Fixes #822
Carlos Martín Nieto [Fri, 13 Jul 2012 18:43:56 +0000 (20:43 +0200)]
indexer: delay resolving deltas
Not all delta bases are available on the first try. By delaying
resolving all deltas until the end, we avoid decompressing some of the
data twice or even more times, saving effort and time.
Carlos Martín Nieto [Fri, 13 Jul 2012 18:46:16 +0000 (20:46 +0200)]
pkt: correctly advertise capabilitites
The correct way to advertise out capabilities is by appending them to
the first 'want' line, using SP as separator, instead of NUL as the
server does. Inconsistent documentation lead to the use of NUL in
libgit2.
Fix this so we can request much more efficient packs from the
remote which reduces the indexing time considerably.
Ignacio Casal Quinteiro [Fri, 13 Jul 2012 15:13:35 +0000 (17:13 +0200)]
Add support for the more standard LIB_INSTALL_DIR variable