]> git.proxmox.com Git - libgit2.git/log
libgit2.git
12 years agoattr: Do not export variables externally
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:

12 years agoMerge pull request #849 from scunz/git_caps
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.

12 years agoAdd 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.

12 years agoMerge pull request #826 from carlosmn/config-find-error
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

12 years agoMerge pull request #837 from carlosmn/travis
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

12 years agoMerge pull request #833 from carlosmn/odb-one
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

12 years agoMerge pull request #840 from carlosmn/remote-unify
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

12 years agotransport: rename encrypt to use_ssl
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.

12 years agofetch: remove timeout code
Carlos Martín Nieto [Wed, 25 Jul 2012 14:30:58 +0000 (16:30 +0200)]
fetch: remove timeout code

12 years agossl: use the callback instead of ifs to determine how to get data
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.

12 years agoexamples: fix warnings in network/
Carlos Martín Nieto [Wed, 25 Jul 2012 08:52:20 +0000 (10:52 +0200)]
examples: fix warnings in network/

12 years agotransport: store the refs in a common area
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.

12 years agoremote: use the same code to control git and http
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).

12 years agonetwork: implement multi_ack for the git transport
Carlos Martín Nieto [Tue, 24 Jul 2012 15:10:57 +0000 (17:10 +0200)]
network: implement multi_ack for the git transport

12 years agoremote: start moving the protocol to a common area
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.

12 years agoMerge pull request #847 from schu/inline-oid-cmp
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

12 years agogit_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

12 years agoFix -Wuninitialized warning
Michael Schubert [Sat, 28 Jul 2012 09:33:12 +0000 (11:33 +0200)]
Fix -Wuninitialized warning

12 years agoMerge pull request #839 from nulltoken/topic/odb-foreach-documentation
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

12 years agoMerge pull request #834 from carlosmn/network-callbacks
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

12 years agobranch: Add `repository` argument to `create`
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.

12 years agoMerge remote-tracking branch 'nulltoken/topic/branch-rework' into development
Vicent Marti [Fri, 27 Jul 2012 16:45:55 +0000 (18:45 +0200)]
Merge remote-tracking branch 'nulltoken/topic/branch-rework' into development

12 years agoreflog: Rename `entry_drop` to `drop`
Vicent Marti [Fri, 27 Jul 2012 16:43:02 +0000 (18:43 +0200)]
reflog: Rename `entry_drop` to `drop`

12 years agoMerge remote-tracking branch 'nulltoken/topic/reflog-delete' into development
Vicent Marti [Fri, 27 Jul 2012 16:39:40 +0000 (18:39 +0200)]
Merge remote-tracking branch 'nulltoken/topic/reflog-delete' into development

12 years agoremote: fix C99-ism
Carlos Martín Nieto [Fri, 27 Jul 2012 00:37:15 +0000 (02:37 +0200)]
remote: fix C99-ism

12 years agoMerge pull request #838 from scunz/remote_push_url
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

12 years agoRemotes: Use correct url in git_remote_connect
Sascha Cunz [Wed, 25 Jul 2012 00:34:12 +0000 (02:34 +0200)]
Remotes: Use correct url in git_remote_connect

12 years agoRemotes: Save a cleaned pushurl (by deleting it from the config)
Sascha Cunz [Wed, 25 Jul 2012 00:10:35 +0000 (02:10 +0200)]
Remotes: Save a cleaned pushurl (by deleting it from the config)

12 years agoTests: Test remote's pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:59:23 +0000 (01:59 +0200)]
Tests: Test remote's pushurl

12 years agoRemotes: Setter for url+pushurl; Getter for pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:33:15 +0000 (01:33 +0200)]
Remotes: Setter for url+pushurl; Getter for pushurl

12 years agoRemotes: Load/Save for fetch.foo.pushurl
Sascha Cunz [Tue, 24 Jul 2012 23:32:31 +0000 (01:32 +0200)]
Remotes: Load/Save for fetch.foo.pushurl

12 years agoRemove unneccessary string transformation
Sascha Cunz [Tue, 24 Jul 2012 23:14:58 +0000 (01:14 +0200)]
Remove unneccessary string transformation

12 years agotests-clar/status: fix missing-prototype warning
Michael Schubert [Wed, 25 Jul 2012 15:01:50 +0000 (17:01 +0200)]
tests-clar/status: fix missing-prototype warning

12 years agoodb: add some documentation to the foreach() test
nulltoken [Wed, 25 Jul 2012 07:00:58 +0000 (09:00 +0200)]
odb: add some documentation to the foreach() test

12 years agoreflog: keep the reflog name in sync with the reference name
nulltoken [Sat, 21 Jul 2012 17:19:46 +0000 (19:19 +0200)]
reflog: keep the reflog name in sync with the reference name

12 years agoreflog: prevent git_reflog_append() from persisting the reflog back to disk
nulltoken [Sat, 21 Jul 2012 10:33:46 +0000 (12:33 +0200)]
reflog: prevent git_reflog_append() from persisting the reflog back to disk

12 years agoreflog: prevent git_reflog_read() from chocking when no log exists yet
nulltoken [Sat, 21 Jul 2012 10:32:02 +0000 (12:32 +0200)]
reflog: prevent git_reflog_read() from chocking when no log exists yet

12 years agoreflog: introduce git_reflog_write()
nulltoken [Wed, 18 Jul 2012 18:12:45 +0000 (20:12 +0200)]
reflog: introduce git_reflog_write()

12 years agoreflog: rename git_reflog_write() to git_reflog_append()
nulltoken [Mon, 16 Jul 2012 10:12:53 +0000 (12:12 +0200)]
reflog: rename git_reflog_write() to git_reflog_append()

12 years agoreflog: introduce git_reflog_entry_drop()
nulltoken [Mon, 16 Jul 2012 16:31:22 +0000 (18:31 +0200)]
reflog: introduce git_reflog_entry_drop()

12 years agoreflog: add GIT_OID_HEX_ZERO constant
nulltoken [Tue, 17 Jul 2012 08:53:19 +0000 (10:53 +0200)]
reflog: add GIT_OID_HEX_ZERO constant

12 years agotests: reorganize reflog tests
nulltoken [Mon, 16 Jul 2012 13:14:29 +0000 (15:14 +0200)]
tests: reorganize reflog tests

12 years agoMerge pull request #799 from yorah/fix/issue-787
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

12 years agotravis: be more idiomatic with the environment
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.

12 years agobranch: enforce git_branch_delete() parameter checking
nulltoken [Fri, 20 Jul 2012 14:41:41 +0000 (16:41 +0200)]
branch: enforce git_branch_delete() parameter checking

12 years agorefs: drop git_reference_remote_tracking_from_branch()
nulltoken [Fri, 20 Jul 2012 14:39:22 +0000 (16:39 +0200)]
refs: drop git_reference_remote_tracking_from_branch()

12 years agobranch: introduce git_branch_tracking()
nulltoken [Fri, 20 Jul 2012 14:38:54 +0000 (16:38 +0200)]
branch: introduce git_branch_tracking()

12 years agobranch: make git_branch_move() reference based
nulltoken [Fri, 20 Jul 2012 14:34:08 +0000 (16:34 +0200)]
branch: make git_branch_move() reference based

12 years agobranch: slight git_branch_create() doc improvement
nulltoken [Fri, 20 Jul 2012 14:31:17 +0000 (16:31 +0200)]
branch: slight git_branch_create() doc improvement

12 years agobranch: introduce git_reference_is_branch()
nulltoken [Fri, 20 Jul 2012 14:27:56 +0000 (16:27 +0200)]
branch: introduce git_reference_is_branch()

12 years agobranch: introduce git_branch_lookup()
nulltoken [Fri, 20 Jul 2012 14:19:04 +0000 (16:19 +0200)]
branch: introduce git_branch_lookup()

12 years agobranch: change git_branch_create() to make it return a reference
nulltoken [Thu, 19 Jul 2012 13:39:16 +0000 (15:39 +0200)]
branch: change git_branch_create() to make it return a reference

12 years agobranch: remove useless header
nulltoken [Thu, 19 Jul 2012 13:32:58 +0000 (15:32 +0200)]
branch: remove useless header

12 years agoAdd flag to turn off pathspec testing for diff and status
yorah [Mon, 23 Jul 2012 16:16:09 +0000 (18:16 +0200)]
Add flag to turn off pathspec testing for diff and status

12 years agoFix getting status of files containing brackets
yorah [Wed, 18 Jul 2012 14:26:55 +0000 (16:26 +0200)]
Fix getting status of files containing brackets

12 years agoAdd more test coverage to match default git behavior for 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

12 years agoAdd a test for getting status of 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

12 years agoAdd git_buf_unescape and git__unescape to unescape all characters in a string (in...
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)

12 years agoupdate_tips: report error if it fails to create a ref
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

12 years agorevparse: initialize 'parsed' in case the user doesn't give a number with the @-notation
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

12 years agotravis: build with both gcc and clang
Carlos Martín Nieto [Sun, 22 Jul 2012 17:42:47 +0000 (19:42 +0200)]
travis: build with both gcc and clang

12 years agorevparse: don't allow an empty string
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.

12 years agoconfig: set the error code if we can't find the global/system config
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

12 years agoAdd a struct for network callbacks
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.

12 years agotests: plug a leak in the config stress
Carlos Martín Nieto [Sat, 21 Jul 2012 15:54:56 +0000 (17:54 +0200)]
tests: plug a leak in the config stress

12 years agoMerge pull request #818 from nulltoken/rework
Vicent Martí [Sat, 21 Jul 2012 14:56:59 +0000 (07:56 -0700)]
Merge pull request #818 from nulltoken/rework

Revparse rework

12 years agorepo: add git_repository_wrap_odb() to wrap an ODB
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().

12 years agoodb: allow creating an ODB backend from a packfile index
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.

12 years agoconfig: escape subsection names when creating them
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

12 years agoMerge pull request #831 from schu/tree-walk-order
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

12 years agoFix bug with merging diffs with null options
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.

12 years agotree: fix ordering for git_tree_walk
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.

12 years agorevparse: deploy git_object_peel()
nulltoken [Sun, 15 Jul 2012 09:59:31 +0000 (11:59 +0200)]
revparse: deploy git_object_peel()

12 years agoobject: introduce git_object_peel()
nulltoken [Sun, 15 Jul 2012 09:06:15 +0000 (11:06 +0200)]
object: introduce git_object_peel()

Partially fix #530

12 years agorevparse: enhance parsing engine
nulltoken [Sat, 14 Jul 2012 22:46:26 +0000 (00:46 +0200)]
revparse: enhance parsing engine

12 years agoMerge pull request #827 from schu/cleanup-error-cruft
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

12 years agoRemove old error handling code
Michael Schubert [Tue, 17 Jul 2012 08:52:16 +0000 (10:52 +0200)]
Remove old error handling code

12 years agoMerge pull request #823 from schu/cmake-install-dir
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

12 years agolibgit2.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.

12 years agorevparse: extend test coverage
nulltoken [Sat, 14 Jul 2012 22:46:01 +0000 (00:46 +0200)]
revparse: extend test coverage

12 years agorevparse: add reflog test data
nulltoken [Sat, 14 Jul 2012 22:45:20 +0000 (00:45 +0200)]
revparse: add reflog test data

12 years agoMerge pull request #821 from nacho/development
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

12 years agoattr: Rename the `git_attr__` exports
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

12 years agoindexer: delay resolving deltas
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.

12 years agopkt: correctly advertise capabilitites
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.

12 years agoAdd support for the more standard LIB_INSTALL_DIR variable
Ignacio Casal Quinteiro [Fri, 13 Jul 2012 15:13:35 +0000 (17:13 +0200)]
Add support for the more standard LIB_INSTALL_DIR variable

12 years agoMerge pull request #815 from nulltoken/topic/revparse-refac
Vicent Martí [Fri, 13 Jul 2012 13:56:24 +0000 (06:56 -0700)]
Merge pull request #815 from nulltoken/topic/revparse-refac

More revparse <3

12 years agoMerge pull request #817 from nulltoken/fix/refs-leak
Vicent Martí [Fri, 13 Jul 2012 13:53:33 +0000 (06:53 -0700)]
Merge pull request #817 from nulltoken/fix/refs-leak

refs: fix a memory leak

12 years agorefs: fix a memory leak
nulltoken [Thu, 12 Jul 2012 20:03:28 +0000 (22:03 +0200)]
refs: fix a memory leak

12 years agorevparse: fix propagation of error
nulltoken [Thu, 12 Jul 2012 20:31:53 +0000 (22:31 +0200)]
revparse: fix propagation of error

12 years agorevparse: only allow decimal specifiers in carete and tilde synatx
nulltoken [Thu, 12 Jul 2012 11:20:29 +0000 (13:20 +0200)]
revparse: only allow decimal specifiers in carete and tilde synatx

    passing 0 to git_strol(32|64) let the implementation guess if it's
    dealing with an octal number or a decimal one.

    Let's make it safe and ensure that both 'HEAD@{010}' and 'HEAD@{10}'
    point at the same commit.

12 years agorevparse: fix disambiguation of refs and abbrev oids
nulltoken [Thu, 12 Jul 2012 09:46:20 +0000 (11:46 +0200)]
revparse: fix disambiguation of refs and abbrev oids

12 years agorevparse: simplify handling of the colon syntax
nulltoken [Thu, 12 Jul 2012 08:57:31 +0000 (10:57 +0200)]
revparse: simplify handling of the colon syntax

12 years agotree: unfound tree entry returns GIT_ENOTFOUND
nulltoken [Thu, 12 Jul 2012 08:52:19 +0000 (10:52 +0200)]
tree: unfound tree entry returns GIT_ENOTFOUND

12 years agotree: prevent git_tree_entry_free() from segfaulting when being passed a NULL tree_entry
nulltoken [Thu, 12 Jul 2012 07:46:45 +0000 (09:46 +0200)]
tree: prevent git_tree_entry_free() from segfaulting when being passed a NULL tree_entry

12 years agotravis: make it run the tests under valgrind
Carlos Martín Nieto [Thu, 12 Jul 2012 19:04:09 +0000 (21:04 +0200)]
travis: make it run the tests under valgrind

12 years agoFix memory leak in test
Russell Belfer [Thu, 12 Jul 2012 18:56:50 +0000 (11:56 -0700)]
Fix memory leak in test

12 years agoMissed a couple of khash inline dependencies
Russell Belfer [Thu, 12 Jul 2012 18:52:10 +0000 (11:52 -0700)]
Missed a couple of khash inline dependencies

12 years agoIsolate khash inlines from global namespace
Russell Belfer [Thu, 12 Jul 2012 18:48:12 +0000 (11:48 -0700)]
Isolate khash inlines from global namespace

khash.h was globally #define'ing "inline" which messes with
other files.  Let's keep it as "kh_inline".

12 years agoUse GIT_INLINE instead of inline
Carlos Martín Nieto [Thu, 12 Jul 2012 18:48:46 +0000 (20:48 +0200)]
Use GIT_INLINE instead of inline