]> git.proxmox.com Git - libgit2.git/log
libgit2.git
12 years agoFix warnings and merge issues on Win64
Russell Belfer [Thu, 23 Aug 2012 16:20:17 +0000 (09:20 -0700)]
Fix warnings and merge issues on Win64

12 years agoSome cleanup suggested during review
Russell Belfer [Wed, 22 Aug 2012 23:03:35 +0000 (16:03 -0700)]
Some cleanup suggested during review

This cleans up a number of items suggested during code review
with @vmg, including:

* renaming "outside repo" config API to `git_config_open_default`
* killing the `git_config_open_global` API
* removing the `git_` prefix from the static functions in fileops
* removing some unnecessary functionality from the "cp" command

12 years agoDon't reference stack vars in cleanup callback
Russell Belfer [Wed, 1 Aug 2012 21:49:47 +0000 (14:49 -0700)]
Don't reference stack vars in cleanup callback

If you use the clar cleanup callback function, you can't pass a
reference pointer to a stack allocated variable because when the
cleanup function runs, the stack won't exist anymore.

12 years agofix missing validation and type cast warning
Russell Belfer [Wed, 1 Aug 2012 21:30:08 +0000 (14:30 -0700)]
fix missing validation and type cast warning

12 years agoAdd template dir and set gid to repo init
Russell Belfer [Wed, 1 Aug 2012 00:02:54 +0000 (17:02 -0700)]
Add template dir and set gid to repo init

This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.

This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.

Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`.  Also, this includes
some new path functions that were useful to keep the code
simple.

12 years agoAdd git_repository_init_ext for power initters
Russell Belfer [Thu, 26 Jul 2012 23:07:01 +0000 (16:07 -0700)]
Add git_repository_init_ext for power initters

The extended version of repository init adds support for many
of the things that you can do with `git init` and sets up
structures that will make it easier to extend further in the
future.

12 years agoMinor bug fixes in diff code
Russell Belfer [Wed, 22 Aug 2012 20:57:57 +0000 (13:57 -0700)]
Minor bug fixes in diff code

In looking at PR #878, I found a few small bugs in the diff code,
mostly related to work that can be avoided when processing tree-
to-tree diffs that was always being carried out.  This commit has
some small fixes in it.

12 years agoMerge pull request #891 from arrbee/internal-ignore-api
Vicent Martí [Wed, 22 Aug 2012 20:15:14 +0000 (13:15 -0700)]
Merge pull request #891 from arrbee/internal-ignore-api

API for managing in-memory ignore rules

12 years agoWrap up ignore API and add tests
Russell Belfer [Wed, 22 Aug 2012 18:42:00 +0000 (11:42 -0700)]
Wrap up ignore API and add tests

This fills out the ignore API and adds tests.

12 years agoAdd public API for internal ignores
Russell Belfer [Wed, 22 Aug 2012 00:26:39 +0000 (17:26 -0700)]
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.

12 years agoMerge pull request #889 from nulltoken/filemode-enum
Vicent Martí [Tue, 21 Aug 2012 21:32:09 +0000 (14:32 -0700)]
Merge pull request #889 from nulltoken/filemode-enum

Filemode enum

12 years agotree entry: rename git_tree_entry_attributes() into git_tree_entry_filemode()
nulltoken [Tue, 21 Aug 2012 09:45:16 +0000 (11:45 +0200)]
tree entry: rename git_tree_entry_attributes() into git_tree_entry_filemode()

12 years agofilemode: deploy enum usage
nulltoken [Fri, 17 Aug 2012 19:10:32 +0000 (21:10 +0200)]
filemode: deploy enum usage

12 years agofilemode: introduce enum to ease use of attributes
nulltoken [Fri, 17 Aug 2012 19:15:32 +0000 (21:15 +0200)]
filemode: introduce enum to ease use of attributes

12 years agoWin32: test core.autocrlf
Ben Straub [Tue, 21 Aug 2012 17:10:32 +0000 (10:10 -0700)]
Win32: test core.autocrlf

12 years agoTests: close file handles before asserting
Ben Straub [Tue, 21 Aug 2012 03:24:20 +0000 (20:24 -0700)]
Tests: close file handles before asserting

Avoids getting ERROR_SHARING_VIOLATION on win32
and killing the entire clar run.

12 years agoMerge pull request #884 from carlosmn/global-windows
Vicent Martí [Mon, 20 Aug 2012 19:10:23 +0000 (12:10 -0700)]
Merge pull request #884 from carlosmn/global-windows

Make the memory-window conrol structures global

12 years agoMake the memory-window conrol structures global
Carlos Martín Nieto [Sat, 18 Aug 2012 20:11:49 +0000 (22:11 +0200)]
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.

12 years agoMerge pull request #879 from nulltoken/deprecated-mode
Vicent Martí [Sun, 19 Aug 2012 22:12:43 +0000 (15:12 -0700)]
Merge pull request #879 from nulltoken/deprecated-mode

Handling of 100664 deprecated mode in tree entries

12 years agotreebuilder: enhance attributes handling on insertion
nulltoken [Fri, 17 Aug 2012 09:21:49 +0000 (11:21 +0200)]
treebuilder: enhance attributes handling on insertion

12 years agoAdd deprecated-mode.git test repository
nulltoken [Thu, 16 Aug 2012 09:53:24 +0000 (11:53 +0200)]
Add deprecated-mode.git test repository

12 years agoMerge pull request #778 from ben/clone
Vicent Martí [Sun, 19 Aug 2012 08:26:06 +0000 (01:26 -0700)]
Merge pull request #778 from ben/clone

Clone

12 years agoMerge pull request #877 from nulltoken/minor-fixes
Vicent Martí [Wed, 15 Aug 2012 21:34:49 +0000 (14:34 -0700)]
Merge pull request #877 from nulltoken/minor-fixes

Minor fixes

12 years agorefs: fix missing parameter documentation
nulltoken [Wed, 15 Aug 2012 15:54:05 +0000 (17:54 +0200)]
refs: fix missing parameter documentation

12 years agonotes: slight documentation enhancements
nulltoken [Wed, 15 Aug 2012 15:50:02 +0000 (17:50 +0200)]
notes: slight documentation enhancements

12 years agoFix compilation warning
nulltoken [Tue, 14 Aug 2012 22:08:38 +0000 (00:08 +0200)]
Fix compilation warning

12 years agotests: fix tree walking test
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

12 years agoMerge pull request #873 from carlosmn/tree-walk
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

12 years agoMerge pull request #875 from arrbee/fix-message-prettify-length-check
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

12 years agoMake git_message_prettify return bytes written
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.

12 years agoMerge pull request #871 from joshtriplett/fix-note_foreach-docs
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

12 years agoMerge pull request #870 from joshtriplett/fix-note_create-docs
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

12 years agoMerge pull request #872 from joshtriplett/fix-note_remove-docs
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

12 years agoMerge pull request #867 from joshtriplett/fix-array-size-for-git_config_get_mapped
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

12 years agoMerge pull request #866 from arrbee/fix-config-file-parsing
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

12 years agotree: allow the user to skip an entry or cancel the walk
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.

12 years agotree: bring back the documented behaviour for a walk
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.

12 years agoClean up code
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

12 years agogit_note_remove: Copyediting on documentation for the oid parameter
Josh Triplett [Sun, 12 Aug 2012 14:06:11 +0000 (07:06 -0700)]
git_note_remove: Copyediting on documentation for the oid parameter

12 years agoCheck prettify message output buffer after cleanup
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.

12 years agoFix config parser boundary logic
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.

12 years agogit_note_foreach: Fix documentation for notes_ref parameter
Josh Triplett [Sun, 12 Aug 2012 13:31:42 +0000 (06:31 -0700)]
git_note_foreach: Fix documentation for notes_ref parameter

12 years agogit_note_oid: Fix the documentation to reference parameters using the correct names
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

12 years agoFix incorrect array size in example for git_config_get_mapped
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.

12 years agoMerge pull request #863 from joshtriplett/export-git_attr_value
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

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

12 years agosha1: add missing header guards
Michael Schubert [Sat, 11 Aug 2012 10:29:24 +0000 (12:29 +0200)]
sha1: add missing header guards

12 years agooid: Explicitly include `oid.h` for the inlined CMP
Vicent Marti [Thu, 9 Aug 2012 22:33:04 +0000 (15:33 -0700)]
oid: Explicitly include `oid.h` for the inlined CMP

12 years agoMerge pull request #861 from josh/parse-chomped-oid
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

12 years agoMerge remote-tracking branch 'arrbee/rtrim-loose-refs' into parse-chomped-oid
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

12 years agoRevert implementation changes
Joshua Peek [Thu, 9 Aug 2012 19:47:29 +0000 (14:47 -0500)]
Revert implementation changes

12 years agoIgnore ref oid terminator
Joshua Peek [Thu, 9 Aug 2012 19:39:56 +0000 (14:39 -0500)]
Ignore ref oid terminator

12 years agoTest trailing space after ref oid
Joshua Peek [Thu, 9 Aug 2012 19:39:43 +0000 (14:39 -0500)]
Test trailing space after ref oid

12 years agotrim whitespace when parsing loose refs
Russell Belfer [Thu, 9 Aug 2012 18:36:21 +0000 (11:36 -0700)]
trim whitespace when parsing loose refs

12 years agoParse ref oids without trailing newline
Joshua Peek [Thu, 9 Aug 2012 17:39:09 +0000 (12:39 -0500)]
Parse ref oids without trailing newline

12 years agoFix iterator check and return value
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.

12 years agoCheckout: fix memory leak in tests.
Ben Straub [Mon, 6 Aug 2012 16:34:17 +0000 (09:34 -0700)]
Checkout: fix memory leak in tests.

12 years agotest: Open ODB on each test suite
Vicent Marti [Mon, 6 Aug 2012 10:53:09 +0000 (12:53 +0200)]
test: Open ODB on each test suite

12 years agoremotes: Proper return for `git_remote_ls`
Vicent Marti [Mon, 6 Aug 2012 10:44:23 +0000 (12:44 +0200)]
remotes: Proper return for `git_remote_ls`

12 years agoMerge remote-tracking branch 'arrbee/tree-walk-fixes' into development
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

12 years agoremote: add missing include git2/remote.h
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.

12 years agoAdd new iteration behavior to git_tree_walk
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.

12 years agoUpdate iterators for consistency across library
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.

12 years agofilebuf: Check the return value for `close`
Vicent Marti [Thu, 2 Aug 2012 23:01:21 +0000 (01:01 +0200)]
filebuf: Check the return value for `close`

12 years agowin32: set errno to ENOENT or ENOTDIR when appropriate in do_lstat
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

12 years agoMerge remote-tracking branch 'nulltoken/topic/amd64-compat' into development
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

12 years agoMerge pull request #850 from libgit2/attr-export
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

12 years agorepository: Indentation
Vicent Marti [Wed, 1 Aug 2012 23:22:51 +0000 (01:22 +0200)]
repository: Indentation

12 years agoMerge pull request #848 from carlosmn/pending-message
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

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 agoClean up a TODO comment.
Ben Straub [Wed, 1 Aug 2012 22:09:05 +0000 (15:09 -0700)]
Clean up a TODO comment.

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 agorepository: add a getter and remove function for git's prepared message
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.

12 years agoAdd documentation for clone methods.
Ben Straub [Wed, 1 Aug 2012 04:25:48 +0000 (21:25 -0700)]
Add documentation for clone methods.

12 years agoCheckout: fix problem with detached HEAD.
Ben Straub [Wed, 1 Aug 2012 02:49:19 +0000 (19:49 -0700)]
Checkout: fix problem with detached HEAD.

12 years agoAdd checkout.h to git2.h.
Ben Straub [Wed, 1 Aug 2012 02:39:06 +0000 (19:39 -0700)]
Add checkout.h to git2.h.

Also correcting some documentation strings.

12 years agoCheckout: fix crlf tests under win32.
Ben Straub [Tue, 31 Jul 2012 23:24:04 +0000 (16:24 -0700)]
Checkout: fix crlf tests under win32.

12 years agoCheckout: crlf filter.
Ben Straub [Tue, 31 Jul 2012 22:38:12 +0000 (15:38 -0700)]
Checkout: crlf filter.

12 years agoCheckout: handle file modes properly.
Ben Straub [Tue, 31 Jul 2012 17:44:42 +0000 (10:44 -0700)]
Checkout: handle file modes properly.

Global file mode override now works properly with
the file mode stored in the tree node.

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 agoTry to fix Travis.
Ben Straub [Tue, 31 Jul 2012 16:01:11 +0000 (09:01 -0700)]
Try to fix Travis.

12 years agoRename example function to avoid name collision.
Ben Straub [Tue, 31 Jul 2012 15:51:38 +0000 (08:51 -0700)]
Rename example function to avoid name collision.

12 years agoCheckout: save index on checkout.
Ben Straub [Tue, 31 Jul 2012 15:45:42 +0000 (08:45 -0700)]
Checkout: save index on checkout.

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 agoEnable stats on git_index_read_tree.
Ben Straub [Mon, 30 Jul 2012 21:52:46 +0000 (14:52 -0700)]
Enable stats on git_index_read_tree.

Replace with the contents of
git_index_read_tree_with_stats() and improve
documentation comments.

12 years agoAdd clone to the network example.
Ben Straub [Mon, 30 Jul 2012 21:38:32 +0000 (14:38 -0700)]
Add clone to the network example.

12 years agoCheckout: use git_index_read_tree_with_stats.
Ben Straub [Mon, 30 Jul 2012 21:37:40 +0000 (14:37 -0700)]
Checkout: use git_index_read_tree_with_stats.

New variant of git_index_read_tree that fills in
the 'total' field of a git_indexer_stats struct
as it's walking the tree.

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